www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - code-debug 0.3.0 released (GDB for vscode)

reply WebFreak001 <janju007 web.de> writes:
I recently started with a GDB extension for debugging D code in 
visual studio code and now its in a pretty ready state supporting 
most things GDB can do, covering nearly everything the vscode UI 
allows me to do. It supports debugging, attaching to processes & 
gdbserver and debugging over SSH + X11 forwarding.

I've used it quite a lot now and it works great with D on linux. 
I will add more debuggers in the future (also lldb and others 
that support MI command syntax).

If you have visual studio code, just run `ext install debug` and 
follow the instructions in the README

Source code for those of you who are interested: 
https://github.com/WebFreak001/code-debug
Feb 09 2016
next sibling parent reply Joel <joelcnz gmail.com> writes:
On Tuesday, 9 February 2016 at 22:31:37 UTC, WebFreak001 wrote:
 I recently started with a GDB extension for debugging D code in 
 visual studio code and now its in a pretty ready state 
 supporting most things GDB can do, covering nearly everything 
 the vscode UI allows me to do. It supports debugging, attaching 
 to processes & gdbserver and debugging over SSH + X11 
 forwarding.

 I've used it quite a lot now and it works great with D on 
 linux. I will add more debuggers in the future (also lldb and 
 others that support MI command syntax).

 If you have visual studio code, just run `ext install debug` 
 and follow the instructions in the README

 Source code for those of you who are interested: 
 https://github.com/WebFreak001/code-debug
I don't understand the 'ext install debug' is that linux only. How would I get the extension to work on OSX?
Feb 09 2016
parent reply Mike Parker <aldacron gmail.com> writes:
On Wednesday, 10 February 2016 at 05:09:28 UTC, Joel wrote:

 I don't understand the 'ext install debug' is that linux only. 
 How would I get the extension to work on OSX?
Inside Visual Studio Code, press F1 and start typing the command. Actually, it doesn't let you execute the command directly. Once you start typing 'ext' you'll see several options in the drop down menu that begin 'Extensions:'. Select 'Extensions: Install Extension'. It will take a second or two to prepare the extensions list. Whatever you've typed in the text field will change to 'ext install'. Just append 'debug' to that and you'll be able to select the Debug extension from the list (or simply press return).
Feb 09 2016
parent reply Joel <joelcnz gmail.com> writes:
On Wednesday, 10 February 2016 at 05:42:21 UTC, Mike Parker wrote:
 On Wednesday, 10 February 2016 at 05:09:28 UTC, Joel wrote:

 I don't understand the 'ext install debug' is that linux only. 
 How would I get the extension to work on OSX?
Inside Visual Studio Code, press F1 and start typing the command. Actually, it doesn't let you execute the command directly. Once you start typing 'ext' you'll see several options in the drop down menu that begin 'Extensions:'. Select 'Extensions: Install Extension'. It will take a second or two to prepare the extensions list. Whatever you've typed in the text field will change to 'ext install'. Just append 'debug' to that and you'll be able to select the Debug extension from the list (or simply press return).
Thanks Mike. But now what?
Feb 09 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Wednesday, 10 February 2016 at 06:51:43 UTC, Joel wrote:
 Thanks Mike. But now what?
when you have installed the extension, you can create the debug config as described in the README
Feb 10 2016
parent reply Joel <joelcnz gmail.com> writes:
On Wednesday, 10 February 2016 at 13:04:43 UTC, WebFreak001 wrote:
 On Wednesday, 10 February 2016 at 06:51:43 UTC, Joel wrote:
 Thanks Mike. But now what?
when you have installed the extension, you can create the debug config as described in the README
I've looked at the read me, but it seems different on my OSX version. I get this with the debug gear button: { "version": "0.2.0", "configurations": [ { "name": "Debug", "type": "gdb", "request": "launch", "target": "./output", "cwd": "${workspaceRoot}" } ] }
Feb 10 2016
parent reply WebFreak001 <janju007 web.de> writes:
On Wednesday, 10 February 2016 at 21:57:49 UTC, Joel wrote:
 I get this with the debug gear button:
 {
 	"version": "0.2.0",
 	"configurations": [
 		{
 			"name": "Debug",
 			"type": "gdb",
 			"request": "launch",
 			"target": "./output",
 			"cwd": "${workspaceRoot}"
 		}
 	]
 }
Thats correct. Just change the target to your actual executable and you could debug. If you want to build it before debugging, create a build task and add a preLaunchTask to the config
Feb 10 2016
parent Joel <joelcnz gmail.com> writes:
On Thursday, 11 February 2016 at 00:34:57 UTC, WebFreak001 wrote:
 On Wednesday, 10 February 2016 at 21:57:49 UTC, Joel wrote:
 I get this with the debug gear button:
 {
 	"version": "0.2.0",
 	"configurations": [
 		{
 			"name": "Debug",
 			"type": "gdb",
 			"request": "launch",
 			"target": "./output",
 			"cwd": "${workspaceRoot}"
 		}
 	]
 }
Thats correct. Just change the target to your actual executable and you could debug. If you want to build it before debugging, create a build task and add a preLaunchTask to the config
It says 'Debug adapter process has terminated unexpectedly' on my OSX machine.
Feb 10 2016
prev sibling parent reply Daniel Kozak via Digitalmars-d-announce writes:
Dne 9.2.2016 v 23:31 WebFreak001 via Digitalmars-d-announce napsal(a):
 ext install debug
How can I install it? Where I should put this command? ext install debug
Feb 10 2016
parent Daniel Kozak <kozzi11 gmail.com> writes:
On Wednesday, 10 February 2016 at 14:09:43 UTC, Daniel Kozak 
wrote:
 Dne 9.2.2016 v 23:31 WebFreak001 via Digitalmars-d-announce 
 napsal(a):
 ext install debug
How can I install it? Where I should put this command? ext install debug
OK I found it :). I cant just put ext install debug and hit enter (this will install debugger for chrome)
Feb 10 2016