visual-studio-debugging

msvsmon.exe crashed when debugging

浪子不回头ぞ 提交于 2019-12-02 17:01:59
When I debugging in VS2013 update3, msvsmon.exe crashed when hit at a breakpoint. It shows "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted". I'm not using remote debug. Is it possible to shut down the msvsmon.exe to avoid calling it when debugging ? Deleting all of the breakpoints solves the problem when I hit this error. Disabling the breakpoints was not enough - they had to be deleted. I was able to attach to a process numerous times. Once I added a conditional breakpoint (with a few checks), I started getting this error when attempting to attach

Visual Studio: Debugging a referenced DLL, I have source in another SLN

廉价感情. 提交于 2019-12-02 15:03:00
I am trying to debug a project that has a reference to a DLL that I added, the DLL is stored in an external directory and I just added a reference. Now of course I can debug my project but the line that calls a method on my other dll I can't step into it, i.e. F12. One way I was able to do this was to add my project (dll) as an existing project to my solution and replace the referenced dll to use the attached project rather than a file on disk. But what a mess, I am sure there is a cleaner way? I seem to remember if I copy some PDB files or something but i can't remember. And Do i need to open

VSCode kill running processes

不问归期 提交于 2019-12-02 14:54:42
问题 I have been using Python debug and LLDB attach debug since I have code in Python and C++ I have run this multiple times. It looks like everytime there is an exception in the middle of debugging, the process doesn't get killed. As a result, now after multiple runs, when I try to use LLDB Attach debug it shows multiple instances of the same file being run Unable to know which is the latest process Also how to kill processes that haven't terminated. For reference, here's an image 回答1: Those

Setting a value in the debugger of a shared section

自作多情 提交于 2019-12-02 08:20:25
I have the following code in a DLL: #pragma data_seg("ABC") __declspec (dllexport) char abc[2000] = { 0 }; #pragma data_seg() #pragma comment(linker, "-section:ABC,rws") I have the following code in an executable: extern "C" __declspec(dllimport) char abc[]; char *abcPtr = abc; #define iVar0 (*(long *)(abcPtr)) int main() { printf("Value: %d %p\n", iVar0, &iVar0); iVar0 = 66; printf("Value: %d %p\n", iVar0, &iVar0); char buffer[256]; scanf_s("%s", buffer, 256); } When I run the first instance of the program I get: Value: 0 0FC2A000 Value: 66 0FC2A000 If I run a second instance I get the

Getting Debugger To Break On Next Event

给你一囗甜甜゛ 提交于 2019-12-02 07:23:43
问题 In the Visual Basic 6.0 IDE, it was possible to break a running program that is sitting idle (waiting for an event on the UI thread) then hit F8 (single step). After that, any click, mouse-over, or other event that led to code would cause the debugger to break on the next line of code to execute, which would be the first line of code in the event handler. For example, if you showed a data-entry form with an OK button on it, you could break that form when idle, hit F8, then click the OK button

How to programmatically start the second project from the “StartUp” project in the same C# solution?

时间秒杀一切 提交于 2019-12-02 07:09:15
问题 I have C# VS 2012 solution with two projects: ProjectA and ProjectB. Both projects are console applications for the sake of simplicity. ProjectA needs to be started first so it is set as the "Startup project" for the solution. When I run ProjectA with F5 under debugger there are some operations it needs to performs after which it should start ProjectB under the same debugger . So if I set breakpoint in ProjectB first line, debugger should break. Is there any way I can do this? Currently I use

Debugging Library Code with Visual Studio's Linux support

半城伤御伤魂 提交于 2019-12-02 02:25:59
问题 I'm using Visual Studio 2017's integration to build and debug a CMake Linux application locally in the Windows Subsystem for Linux. When running the application, Visual Studio uses an ssh connection to localhost to run cmake -DCMAKE_BUILD_TYPE="Debug" .. and make , then uses gdbserver to debug the application. This works fine for my application's own code, including breakpoints and line-by-line debugging. This application links to a library file, libhypro.so.17.09 , which is also part of a

Debugging Library Code with Visual Studio's Linux support

早过忘川 提交于 2019-12-02 02:18:11
I'm using Visual Studio 2017's integration to build and debug a CMake Linux application locally in the Windows Subsystem for Linux. When running the application, Visual Studio uses an ssh connection to localhost to run cmake -DCMAKE_BUILD_TYPE="Debug" .. and make , then uses gdbserver to debug the application. This works fine for my application's own code, including breakpoints and line-by-line debugging. This application links to a library file, libhypro.so.17.09 , which is also part of a CMake project. This library is also built locally (stored in my Windows file system, built within Linux

Why do my stack traces only include line numbers if the debugger is attached?

懵懂的女人 提交于 2019-12-01 23:53:12
问题 I have a Xamarin.Android application that reports crashes to Raygun. The stack traces reported to Raygun from Release builds do not include line numbers. If I give the Release build configuration the same settings as the Debug configuration in the .csproj file: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugSymbols>True</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> ... </PropertyGroup> then I still don't see line numbers in the

VS code is ignoring the breakpoint in c++ debugging

喜夏-厌秋 提交于 2019-12-01 23:32:33
问题 I am debugging a c++ code in VS Code but it doesn't stop on breakpoint and visualize the variables, watch and call stack, which it was supposed to do. Instead of this, it prints this in debug console: Breakpoint 1, 0x000000000040074a in main () [Inferior 1 (process 9445) exited normally] The program '/home/hashir/x/a.out' has exited with code 0 (0x00000000) here is launch.json file: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes.