MSVC showing "No disassembly available." for anything compiled out of MSVC

537 views Asked by At

Using MSVC 2017 I'm using Attach to process to a compilation I made from console using MSVC or CLANG (I'm compiling the asm code the compilers generated). Whenever I break the program I only get "No disassembly available.". I get that it cannot show C++ code, it doesn't have any symbols, but asm code shouldn't be a problem, right? Any ideas?

Edit: I'm not doing any obfuscation or anything. It's a really simple "a few lines" program I'm testing it on.

Edit2: If I place __asm { int 3 }; and manage to attach the debugger quickly enough, the break stops the debugger and I CAN view the disassembly.

1

There are 1 answers

0
Vojtěch Melda Meluzín On BEST ANSWER

Someone from MSDN forum solved it ;)

Can you make sure, that in 'Debug->Options...' 'Debugging->General' 'Enable address level debugging' is checked. 'Show disassembly if source is not available' is checked. 'Enable Just My Code' is unchecked - because when VS does not find symbols with line-information - private pdb - it assumes to be 'external' code. If you are debugging more often on machine level, would take a look at standalone WinDbg Preview https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-using-windbg-preview