How do I debug externally with Visual Studio?

Kamlesh Singh Bisht kamlesh.amj at gmail.com
Tue Mar 19 12:42:43 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.

Specify a calling app in a managed DLL project
Select the C# or Visual Basic DLL project in Solution Explorer. 
Select the Properties icon, press Alt+Enter, or right-click and 
choose Properties.

Make sure that the Configuration field at the top of the window 
is set to Debug.

Under Start action:

For .NET Framework DLLs, select Start external program, and add 
the fully qualified path and name of the calling app.

Or, select Start browser with URL and fill in the URL of a local 
ASP.NET app.

For .NET Core DLLs, the Debug Properties page is different. 
Select Executable from the Launch dropdown, and then add the 
fully qualified path and name of the calling app in the 
Executable field.

Add any necessary command-line arguments in the Command line 
arguments or Application arguments field.

Use File > Save Selected Items or Ctrl+S to save changes.




Debug from the DLL project
Set breakpoints in the DLL project.

Right-click the DLL project and choose Set as Startup Project.

Make sure the Solutions Configuration field is set to Debug. 
Press F5, click the green Start arrow or select Debug > Start 
Debugging.

If debugging does not hit your breakpoints, make sure that your 
DLL output (by default, the <project>\Debug folder) is the 
location that the calling app is calling.

WEBSITE: https://www.emailhelpdesk.us/


More information about the Digitalmars-d-debugger mailing list