How do I debug externally with Visual Studio?

CaitlinSmith CaitlinSmith at dooinfo.com
Sat Aug 17 07:53:09 UTC 2019


On Sunday, 21 October 2018 at 02:12:18 UTC, solidstate1991 wrote:
> I use VSCode since it has better D support, however until I 
> make mago-mi usable (it doesn't even support all the commands 
> currently it claims, --args seems to be completely broken) or 
> find again a working copy of LLDB for Windows (doesn't want to 
> compile with Mingw also being installed), I cannot really debug.
>
> The only way I can debug programs is to attach to them after 
> they have started, however it's very clunky to use this way, 
> some programs even execute too fast to do this way.


Try disabling Just My Code (JMC).

Tools -> Options -> Debugger
Uncheck "Enable Just my Code"
By default the debugger tries to restrict the view of the world 
to code that is only contained within your solution. This is 
really heplful at times but when you want to debug code which is 
not in your solution (as is your situation) you need to disable 
JMC in order to see it. Otherwise the code will be treated as 
external and largely hidden from your view.

EDIT

When you're broken in your code try the following.

Debug -> Windows -> Modules
Find the DLL for the project you are interested in
Right Click -> Load Symbols -> Select the Path to the .PDB for 
your other project
https://docsbay.net/debug-only-user-code-with-just-my-code


More information about the Digitalmars-d-debugger mailing list