Thread overview
Help to launch the debugger in VS Codium.
Dec 12, 2022
Mahdis
Dec 12, 2022
WebFreak001
Dec 13, 2022
Mahdis
Dec 13, 2022
WebFreak001
Dec 13, 2022
Mahdis
Dec 13, 2022
WebFreak001
Dec 13, 2022
Mahdis
Dec 13, 2022
WebFreak001
Dec 13, 2022
Mahdis
December 12, 2022

Hello, please help me in setting up the debugger in VS Codium on Fedora 37.
What do I need?
Serve-d,vscode.cpptools, dcd and dub are installed on my system.

I installed code-d, it works great but the debugger just compiles and displays the result and stops even with the directive set here.

December 12, 2022

On Monday, 12 December 2022 at 16:50:53 UTC, Mahdis wrote:

>

Hello, please help me in setting up the debugger in VS Codium on Fedora 37.
What do I need?
Serve-d,vscode.cpptools, dcd and dub are installed on my system.

I installed code-d, it works great but the debugger just compiles and displays the result and stops even with the directive set here.

try installing CodeLLDB (openvsx), it's usually a nice out-of-the-box experience with debugging on linux. It even downloads the debugger automatically and is the preferred auto-pick choice by code-d when using the "code-d" debug type on Linux.

December 13, 2022

On Monday, 12 December 2022 at 19:11:37 UTC, WebFreak001 wrote:

>

On Monday, 12 December 2022 at 16:50:53 UTC, Mahdis wrote:

>

[...]

try installing CodeLLDB (openvsx), it's usually a nice out-of-the-box experience with debugging on linux. It even downloads the debugger automatically and is the preferred auto-pick choice by code-d when using the "code-d" debug type on Linux.

Thankful
But this plugin needs to install lldb-mi for D language?
I couldn't compile lldb-mi

December 13, 2022

On Tuesday, 13 December 2022 at 08:17:53 UTC, Mahdis wrote:

>

On Monday, 12 December 2022 at 19:11:37 UTC, WebFreak001 wrote:

>

On Monday, 12 December 2022 at 16:50:53 UTC, Mahdis wrote:

>

[...]

try installing CodeLLDB (openvsx), it's usually a nice out-of-the-box experience with debugging on linux. It even downloads the debugger automatically and is the preferred auto-pick choice by code-d when using the "code-d" debug type on Linux.

Thankful
But this plugin needs to install lldb-mi for D language?
I couldn't compile lldb-mi

no, CodeLLDB does not need lldb-mi. It also automatically downloads LLDB, so you don't need to install anything.

Native Debug needs lldb-mi, but it's not a great integration like CodeLLDB.

December 13, 2022

On Tuesday, 13 December 2022 at 08:47:48 UTC, WebFreak001 wrote:

>

no, CodeLLDB does not need lldb-mi. It also automatically downloads LLDB, so you don't need to install anything.

Native Debug needs lldb-mi, but it's not a great integration like CodeLLDB.

The problem that occurred:
could not find a process named /home/mahdis/PL/ProgrammingLanguage/test/a

I did the launch.json settings in this way, but it doesn't work:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "lldb",
            "request": "launch",
            "program": "${workspaceFolder}/main",
            "args": ["-arg1", "-arg2"],
        }

    ]
}

Can I see your launch.json settings?

December 13, 2022

On Tuesday, 13 December 2022 at 09:39:14 UTC, Mahdis wrote:

>

On Tuesday, 13 December 2022 at 08:47:48 UTC, WebFreak001 wrote:

>

no, CodeLLDB does not need lldb-mi. It also automatically downloads LLDB, so you don't need to install anything.

Native Debug needs lldb-mi, but it's not a great integration like CodeLLDB.

The problem that occurred:
could not find a process named /home/mahdis/PL/ProgrammingLanguage/test/a

I did the launch.json settings in this way, but it doesn't work:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "lldb",
            "request": "launch",
            "program": "${workspaceFolder}/main",
            "args": ["-arg1", "-arg2"],
        }

    ]
}

Can I see your launch.json settings?

I don't know where the test/a path comes from because your launch.json is /main at the end.

This one should work:

{
	"type": "code-d",
	"request": "launch",
	"name": "Debug D project",
	"cwd": "${workspaceFolder}",
	"program": "./main"
}

the "code-d" debug type just forwards to another debug extension. It picks the best one that is installed for the current platform. For Linux that is CodeLLDB.

December 13, 2022

On Tuesday, 13 December 2022 at 09:48:30 UTC, WebFreak001 wrote:

>

I don't know where the test/a path comes from because your launch.json is /main at the end.

This one should work:

{
	"type": "code-d",
	"request": "launch",
	"name": "Debug D project",
	"cwd": "${workspaceFolder}",
	"program": "./main"
}

the "code-d" debug type just forwards to another debug extension. It picks the best one that is installed for the current platform. For Linux that is CodeLLDB.

Sorry, I have a problem again, I made these settings, but it compiles, then the result is displayed and it stops:

My launch.json settings:

        {
            "type": "code-d",
            "request": "launch",
            "name": "Debug D project",
            "cwd": "${workspaceFolder}/source",
            "program": "./app",

        }

result in OUTPUT:

[Running] cd "/home/mahdis/PL/ProgrammingLanguage/newd/source/" && dmd app.d && "/home/mahdis/PL/ProgrammingLanguage/newd/source/"app
48
[Done] exited with code=0 in 1.408 seconds

result in DEBUG CONSOLE:

Launching: /home/mahdis/PL/ProgrammingLanguage/newd/source/app
Launched process 11460
Process exited with code 0.
December 13, 2022

On Tuesday, 13 December 2022 at 10:22:02 UTC, Mahdis wrote:

>

On Tuesday, 13 December 2022 at 09:48:30 UTC, WebFreak001 wrote:

>

[...]

Sorry, I have a problem again, I made these settings, but it compiles, then the result is displayed and it stops:

[...]

how are you compiling your app? If you run dmd manually, make sure to include the -g flag to enable debugging symbols (needed for debugging)

December 13, 2022

On Tuesday, 13 December 2022 at 11:24:01 UTC, WebFreak001 wrote:

>

how are you compiling your app? If you run dmd manually, make sure to include the -g flag to enable debugging symbols (needed for debugging)

Thanks, that was the problem. Solved with -g flag.