Re: debugging in vs code on Windows

2017-10-14 Thread piotrklos via Digitalmars-d-learn
On Saturday, 14 October 2017 at 13:12:51 UTC, Jerry wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) If you use generate a 32-bit binary using DMD, it generates it in a format that the C/C++ extension doesn't understand. You need to compile -m32mscoff or -m64, and

Re: debugging in vs code on Windows

2017-10-14 Thread piotrklos via Digitalmars-d-learn
On Saturday, 14 October 2017 at 13:20:27 UTC, Jerry wrote: On Saturday, 14 October 2017 at 10:15:53 UTC, evilrat wrote: webfreak's NativeDebug extension to be able to click to set breakpoint on lines(only for that). You can just use VS Code setting, put the following into your

Re: debugging in vs code on Windows

2017-10-14 Thread piotrklos via Digitalmars-d-learn
On Friday, 13 October 2017 at 17:04:00 UTC, kerdemdemir wrote: On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote: (...) I am using VisualD(https://github.com/dlang/visuald/releases) with vs2015 community version(free) and I can debug. I highly recommend it if you haven't tried

debugging in vs code on Windows

2017-10-13 Thread piotrklos via Digitalmars-d-learn
I have windows 10, VS Code with code-d and C/C++ language extensions. I try to debug but it doesn't work. In particular, the debugging doesn't stop on breakpoints. It exits immediately. I recompile with -m64 and -g. I use dub to build the project. I use unit-threaded and I'm trying to debug a

need to emulate scope(failure) with struct destructor

2017-05-28 Thread piotrklos via Digitalmars-d-learn
I need to perform an action, in multiple separate functions, if scope exits with an exception. The trouble is I don't want to litter my code with scope(failure) everywhere. I already create an instance of a struct at each location, with the sole purpose of doing things at the end of scope. So