Description
I'm trying to run a custom gdb(qnx neutrino -> ntoaarch64-gdb), but for that, I need to set up some environment variables before. I've tried to use the "environment" field, the "envFile" approach, using "terminal.integrated.env.linux", doing a "preLaunchTask" and many other things but I'm not able to set them before the call of the binary. Every try results in gdb being executed without the environment variables. I also have an environment script(.sh) for setting up all the variables.
Steps to reproduce:
- I'm trying to run the launch gdb that needs some environment variables to be set.
- Try to add the envFile, environment field or any other approach.
- Launch the debugger
- See that the gdb debugger fails because variables are not set.
launch.json
{
"name": "Launch debug (GDB)",
"type": "cppdbg",
"request": "launch",
"miDebuggerPath": "/path/to/ntoaarch64-gdb",
"program": "/path/to/binary",
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"miDebuggerServerAddress": "(ip):(port)",
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"envFile": "${workspaceFolder}/.env",
"environment": [
{
"name":"ENVVAR",
"value": "/some/path/"
}
]
}
This returns this output:
¡QNX environment is not set!
It seems like vscode has two types of terminal, the integrated terminal and the internal terminal. The variables I've been setting sometimes has effect on the integrated one but never in the internal.
Could you help me with this issue? Thanks
I've tried to use the "environment" field, the "envFile" approach, using "terminal.integrated.env.linux", doing a "preLaunchTask" and many other things but I'm not able to set them before the call of the binary in the internal terminal.
environmentfield description forcppdbglaunch configs says: "Environment variables to add to the environment for the program."