On Friday, 23 April 2021 at 20:05:30 UTC, Dennis wrote:
On Tuesday, 6 April 2021 at 21:04:47 UTC, WebFreak001 wrote:
I have created editor independent pretty printers / visualization files for Visual Studio's debugger\*, GDB and LLDB.

The script and setup guide are available here: https://github.com/Pure-D/dlang-debug

This is great. Pretty-printing of associative arrays is a pretty big deal!

I'm having problems setting it up though.

You say the configuration is bundled since code-d 0.23.0 but the newest version VSCode lets me select is `0.22.0 (1 year ago)`.

yeah the readme is already written assuming I release the new code-d release finally. Currently you still need to do it manually.

When manually adding the script in `setupCommands` of my cppdbg configuration:

```
{
        "description": "Load D GDB type extensions",
        "ignoreFailures": false,
"text": "-interpreter-exec console \"source /path/to/gdb_dlang.py\""
}
```

It said `Undefined command: "import"` referring to line 1 `import gdb.printing`. It looks like it's interpreting `gdb_dlang.py` as a shell script, so I changed `source` to `python`, which gives the error "Python scripting is not supported in this copy of GDB".
I have `GNU gdb (Debian 8.2.1-2+b3) 8.2.1`.

Maybe my version is too old (I'm used to that on Debian), or I need to install some other module. I'll look into it later.

oh that's not good, I just saw it's only enabled when built with python support, so some package maintainers might not choose to do so. Considering this is the only real way to get this working however I don't think I have another choice than assume the user has a GDB with python enabled.

Reply via email to