www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Debugging a dub build

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
What's the easiest way to debug a dub app build?

Is there a better way than

     dub run

followed by

     gdb run PATH_TO_APP_BINARY

?
Jan 21 2019
next sibling parent reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Monday, 21 January 2019 at 11:14:35 UTC, Per Nordlöw wrote:
 What's the easiest way to debug a dub app build?

 Is there a better way than

     dub run

 followed by

     gdb run PATH_TO_APP_BINARY

 ?
Correction should be dub build --build=unittest or dub build --build=debug followed by gdb PATH_TO_APP_BINARY
Jan 21 2019
parent JN <666total wp.pl> writes:
On Monday, 21 January 2019 at 11:16:31 UTC, Per Nordlöw wrote:
 Correction should be

     dub build --build=unittest

 or

     dub build --build=debug

 followed by

     gdb PATH_TO_APP_BINARY
Does using an IDE count? Some D IDEs should be able to assist in debugging.
Jan 21 2019
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2019-01-21 12:14, Per Nordlöw wrote:
 What's the easiest way to debug a dub app build?
 
 Is there a better way than
 
      dub run
 
 followed by
 
      gdb run PATH_TO_APP_BINARY
No, there's nothing specific with an application built using Dub. Dub doesn't provide any help with debugging. Just make sure you're debugging a debug build. -- /Jacob Carlborg
Jan 21 2019