Sublime Forum

Sublime Text 3 build 3047 with SublimeGDB

#1

Has anyone been able to get SublimeGDB to work with ST3, build 3047 x64?
I am running Win 7 64 bit
I get the following error on trying to launch debugger

[quote]Traceback (most recent call last):
File “X/subprocess.py”, line 1090, in _execute_child
NotADirectoryError: [WinError 267] The directory name is invalid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\SublimeText3\sublime_plugin.py”, line 526, in run_
return self.run()
File “sublimegdb in C:\Users\kaubansa\AppData\Roaming\Sublime Text 3\Installed Packages\SublimeGDB.sublime-package”, line 1572, in run
File “X/subprocess.py”, line 818, in init
File “X/subprocess.py”, line 1096, in _execute_child
NotADirectoryError: [WinError 267] The directory name is invalid[/quote]

0 Likes

#2

have you managed to get it working?

I’m getting a similar error:

Let me know
Thanks

0 Likes

#3

You should post that on the plugin’s issue tracker… github.com/quarnster/SublimeGDB … state=open

0 Likes

#4

Hi subhaze,

Thanks for your reply.

I finally managed to make it work, it was mainly my lack of understanding how the whole plugin works.

I was doing the following wrong:

  1. I was building the C++ code without using the -g parameter, basically by running the Cmd + B. I then built the file by using the command
    g++ myfile.cpp -g -o myfile

  2. The settings in the sublime-project was wrong, my final setting looks like this:

"settings":
	{
		"sublimegdb_commandline": "gdb --interpreter=mi ./myfile",
		"sublimegdb_workingdir": "${folder:${project_path:myfile}}",
		"sublimegdb_exec_cmd": "-exec-run",
		"tab_size": 8,
		"sublimegdb_i_know_how_to_use_gdb_thank_you_very_much": true
	}

It was particularly important to set the flag sublimegdb_i_know_how_to_use_gdb_thank_you_very_much to true, otherwise I keep getting annoying pop ups

I hope this helps someone else trying to set up sublimegdb

Juan

0 Likes

#5

Your sublime config file, Does it only has the settings part or section?
I test it with that section (“settings”: ) or all sections and always I have the same error, I tested with ${file} or a real name without extension…
I can not to debug…I am trying to debug with dmd compiler. anI compiled with -g and debug options.
{
“settings”:
{ “sublimegdb_commandline”: “gdb --interpreter=mi --args ./${file_base_name}”,
“sublimegdb_workingdir”: “${folder:${file}}”,
“sublimegdb_arguments”: "1 2 3 4 5 6 7 8 8 ",
“sublimegdb_exec_cmd”: “-exec-run”,
“tab_size”: 8,
“sublimegdb_i_know_how_to_use_gdb_thank_you_very_much”: true,
},
“env”: {“DISPLAY”: “:100”},
}
And this is my compilation file
I used Run and unittest variants and the same error
Bad configurtion in file debug…

{
“shell_cmd”: “C:\D\dmd2\windows\bin\dmd -g -debug “$file””,
“file_regex”: “^(.?)\(([0-9]+),?([0-9]+)?\): (.)”,
“selector”: “source.d”,

"variants": [
    {
        "name": "Run",
        "cmd": ["rdmd", "-g", "-debug", "$file"]
    },
    {
        "name": "unittest",
        "cmd": ["rdmd", "-g", "-debug", "-unittest", "$file"]
    },
    {
        "name": "dub",
        "working_dir": "$project_path",
        "cmd": ["dub"]
    }
]

}
The compilation process produce objets files .o, .obj, and .exe and run ok.

0 Likes