Windows 10 does not show close/debug window any more - c++

Hi I'm working on a c++ project by visual studio 2015 and windows 10 enterprise.
But I can't make windows to show close/debug window on crashes. I want to use jit debugging to find cause of crash for example I wrote this code to crash my program
// testvc2015.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "assert.h"
int main()
{
char *b=0;
b[11] = 36;
assert(false);
return 0;
}
and when I run this program in windows 10 I got this dialogue
stop working
then I got this dialogue and program exit without any chance for debug
no debug button
I double checked the jit debugging in vs2015 and the options are set also I checked windows error reporting service and it's running.
How can I make windows to show debug button on crashes?

It was not the Windows Debugger button, it was the JIT debugging button. If we want to use it, we would enable the JIT debugging.
Troubleshooting steps:
(1) Just run your VS as the admin, and then enable the Just-In-Time Debugging in Visual Studio, run your app again (Ctrl+F5).
(2) I also suggest you reset your VS settings, and then test it again. At least, we could know that whether it was related to the VS settings.
I test it in my VS2015 with update 3, I could get the debug button.
If still no help, I suggest you repair your VS, view the result.

After trying all kind of crazy ideas I disabled the windows firewall and it fixed my problem! I enabled the firewall again and its working for now.

Related

Visual studio 2017 debug console saying "ops"

First off, i haven't been coding or using Visual studio for super long so please explain in details so i can follow. Thanks!
Every time i try to run any code i get the message "ops" in the debug window. I disabled my antivirus(windows defender) and reinstalled a bunch of times. I get the same issue using Visual studio 2019. Anyone have ideas ?
I tried a bunch of different codes and even the default hello world that the Windows Console Application gives you isn't running.
Please check for the existence of one of the following registry keys.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
If they exist and are not expected, please remove. They may be created by malware, so you may need to use an antivirus product to remove the unwanted software.
Step 1: Add a breakpoint at the top of your program.
Step 2: Enlarge the tiny console window to a normal size.
Step 3: Click "Continue" on the debugger.
Step 4: "ops" turns into "To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops."

Appcelerator Studio Debugger ignores breakpoints

Summary: debugger ignores breakpoints on Appceleration Titanium Studio IDE.
I'm using Appcelerator Studio, build: 4.10.0.201709271713, fresh install on macOS 10.14.1 (Mojave). My iOS project compiles and runs on the simulator just fine, everything behaves properly normally.
When I try and debug, however, execution ignores any breakpoints and just barrels on. I've checked all obvious settings, tried setting breakpoints every way possible, no luck.
If I launch the app under debug in the simulator and just let it sit there, eventually a dialog box will pop up saying "'iOS debugger on simulator...' has encountered a problem. Debugger failed to connect".
Anyone out there know what to do from here? I've been using Studio for years and the debugger part has always 'just worked'. I'm not sure where to look for port and connection settings.

Unable to run SDL program in Eclipse but able to do so in Windows Explorer

I have installed and set up SDL and managed to get a tutorial example to build (the tutorial code is from http://zamma.co.uk/setup-sdl2-eclipse-windows/) as a C++ Project in Eclipse.
The problem is that when I try to run the application from Eclipse, the window doesn't appear, or perhaps it gets closed soon after appearing. Eclipse doesn't appear to show any errors.
When I open the folder containing the executable in Windows Explorer and double-click on the application, it works; a window appears with "Hello World" as the title and closes after two seconds.
How can I get the window to appear when I run from Eclipse? Any breakpoints I set are ignored by the debugger.
IDE: Eclipse Luna 4.4.1 OS: Windows 7 64-bit
The program now runs in Eclipse, so the solution may have been to refresh Eclipse and double check Build settings and Run configurations, as well as checking for any OS modifications that may affect the software running on it (thanks to all who replied for the help).

Dubugging a program not run within the debugger and without a crash

I left a program running last night, it worked fine for about 5 hours and then one of its built-in self-diagnostic tests detected a problem and brought up a dialog box telling me the issue. The program was built with debug information (/Zi). Is it possible to somehow get the debugger started so I can examine the value of some variables within the program? Or is it too late?
You can attach the debugger to the running process:
Debug > Attach to Process...
Just open up the program's solution first.
Assuming you've still got the error dialog on the screen you can break into the program and work back up the call stack examining variables etc.
For the future crashes ... if you have windbg or Visual Studio Professional, you can debug crash dumps, even when program isn't running. It is quite useful sometimes. See "MiniDumpWriteDump" on MSDN for more info.
Other than that it is "Attach to process".
Professional edition of Visual Studio have Just-in-Time debugger, that will kick in as soon as anything crashes, even if MSVC wasn't running. It will also locate source code (if debug info and source code are available) and open/create solution for you.
There is an option in the Debug menu to attach the debugger to a running process, IIRC.

DebugBreak not breaking

I'm writing a class in C++ that I cannot debug by using F5. The code will run from another "service" that will invoke it.
In the past I've used __debugbreak() and when I got a window telling me that an exception was thrown selected to debug it.
Recently I've updated to windows 7 and it kept working for a while.
Today when I've tried to debug a piece of my code instead of shown the regular dialog that tells me that VSTestHost has stopped working and enable me to to debug the application I got a different dialog suggesting I send the data to microsoft for analysis.
Does anyone knows how can I fix this issue so I'll be able to debug my code?
Finally I found the cause of the issue.
It's a Vista/Win7 cause:
Open The Action center control
Goto Action Center settings
Goto Problem Reporting Settings
Choose "Each time a problem occurs, ask me before checking for solution"
Although this is more of IT solution/question I've been plagued with this problem all day and wanted to share the solution with other developers who encounter this problem.
I finally found the solution for Windows 10/11 here:
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/enabling-postmortem-debugging
And also: https://learn.microsoft.com/en-us/windows/desktop/Debug/configuring-automatic-debugging
To enable automatic debugger launch, you should add a registry value:
key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug, value Auto = 1 (of type REG_DWORD)
The configured debugger is set the by the value Debugger (type REG_SZ); a Visual Studio installation sets this to:
"C:\WINDOWS\system32\vsjitdebugger.exe" -p %ld -e %ld
Note that on 64 bit OS this only works for 64 bit executables. To enable the same behaviour in 32 bit executables set the same values in this key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug
In that case...
http://community.codesmithtools.com/blogs/blake/archive/2009/06/03/tips-amp-tricks-debugging-codesmith-on-microsoft-windows-7.aspx
Here is the quick overview of what you need to-do to enable debugging on a Microsoft Windows 7 machine:
Update the Just-In-Time debugger setting DbgJITDebugLaunchSetting. The setting is found in the registry at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework].
Set the value of DbgJITDebugLaunchSetting to 2.
If you are using a 64bit operating system then you must also set the same key (DbgJITDebugLaunchSetting) in this folder [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework] to 2.
If you run into any issues try running CodeSmith Studio and Visual Studio as an administrator.
Now when CodeSmith enters a break point you will see something like this:
You could try debug > attach to process.