-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot debug on MacOS when long environment variable is set (circa 2000 characters) #6874
Comments
I'm seeing this on OSX using lldb but it's not length it's escaping. The environment variables can, apparently, contain some text that is not properly escaped when invoking lldb. By clearing my environment it seems to work:
|
Hi Scott, I'm not sure the behaviour you're seeing is the same issue. That would conflict with two facts:
I can see how string escaping might be an issue in it's own right, there's very little in the way of public documentation of dotenv files. I think we'll both be better served if you create a separate bug report with a more specific test case, mentioning the specific characters that are creating the issue for you. (I'm sure it will open a nasty can of worms, requiring - gasp! - developers of multiple IDEs communicate amongst themselves :) ) |
Do you have I couldn't find it at the moment, but I'll see if I can later, but I believe |
Hi @WardenGnaw, thank you for looking into this.
|
This issue has been closed automatically because it has not had recent activity. |
Crickets... |
I'm having the exact same issue! |
@WardenGnaw can you please re-open this bug? The issue is still there and it is very easy to reproduce. The debugger is not usable when the environment array is too long |
Increase the command buffer size x10 to support passing long environment variables. This is required in projects like GStreamer requiring to setup env variables like GST_PLUGIN_PATH with several directories in order to be able to debug without having to install into a prefix, which takes a long time and slows down the development cycle. microsoft/vscode-cpptools#8411 microsoft/vscode-cpptools#6874
Increase the command buffer size x10 to support passing long environment variables. This is required in projects like GStreamer requiring to setup env variables like GST_PLUGIN_PATH with several directories in order to be able to debug without having to install into a prefix, which takes a long time and slows down the development cycle. microsoft/vscode-cpptools#8411 microsoft/vscode-cpptools#6874
I stumbled into the same issue and following @WardenGnaw I created a new PR that fixes the issue: lldb-tools/lldb-mi#87 To test it, follow the instructions to build lldb-mi from https://github.com/lldb-tools/lldb-mi#building-against-custom-lldb and add to your |
Replace the command buffer with a std::string to support reading arbitrary command line lengths. This is required in projects like GStreamer that setup long environment variables like GST_PLUGIN_PATH with several directories on it. microsoft/vscode-cpptools#8411 microsoft/vscode-cpptools#6874
Replace the command buffer with a std::string to support reading arbitrary command line lengths. This is required in projects like GStreamer that setup long environment variables like GST_PLUGIN_PATH with several directories on it. microsoft/vscode-cpptools#8411 microsoft/vscode-cpptools#6874
Replace the command buffer with a std::string to support reading arbitrary command line lengths. This is required in projects like GStreamer that setup long environment variables like GST_PLUGIN_PATH with several directories on it. microsoft/vscode-cpptools#8411 microsoft/vscode-cpptools#6874
This issue should be reopened, since in order to fix it, it requires an lldb-mi hash bump to include the fix in lldb-tools/lldb-mi#87 |
This issue has been closed as lower priority. We're sorry if this issue still impacts you but unfortunately we're not able to address this. We will accept a pull request from the community if it's applicable for this issue. |
Type: Debugger
Describe the bug
First of all thank you for the great product! 💯 👍 !!!!
To Reproduce
Please include a code sample and
launch.json
configuration.Steps to reproduce the behavior:
Additional context
Problem occurs even if I set the environment directly in the configuration. It appears that the message is truncated on its way to the underlying engine.
The issue goes away if I remove one character from the attached envFile.
According to
DevToolsSecurity -status
, Developer mode is currently enabled.Debug Console output:
`--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (327) <-1008-interpreter-exec console "settings set target.env-vars DYLD_LIBRARY_PATH=\"/Users/vagrant/builds/ninja-release/conan-home/.conan/data/lexactivator/3.12.1///package/98693e2cd8e6a5b0612dd5b0ae31d688615da5b9/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/lexfloatclient/4.3.10///package/98693e2cd8e6a5b0612dd5b0ae31d688615da5b9/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/openscenegraph/3.6.3///package/496c694a158600e9374d6f4ff119717cb4329963/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/cryptopp/8.2.0/bincrafters/stable/package/65b4eeac84096d8cf1459a798c07440f6ed79e3a/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/ccdcsqlite3/3.17.0///package/863dc29f74a5b1da8915b98a222bbcc45e90ce46/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/gtest/1.8.1///package/89353b6e006c1d513020e00f56b6b24bd8163e5d/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/gsoap/2.8.109///package/4bca0050b2fbb691fd93ec5a87cdc464b4cbf097/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/libxl/3.8.2.0///package/fbc9f5348579d8c9e4ba5a008d95280b87ce1e8a/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/inchi/1.04///package/4968af75f822d4742c208cdc37bfd4618fba68cd/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/rstatistics/2.11.1///package/743cf0321be3152777da4d05247a66d1552e70a2/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/csdprotobufs/1.0.117///package/b09b1606af513081c72c033281d3a8b666c2bc74/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/mariadb-connector-c/3.1.11///package/e5367c0e9e837dbe471cdcb23927a9ee1c3a2150/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/pcre/8.41///package/01ffead025ec90a93de23fa980552b4c33618f62/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/openssl/1.1.1i///package/4968af75f822d4742c208cdc37bfd4618fba68cd/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/libxml2/2.9.10///ssssssss\""\n"},"seq":76}
1: (327) <-1008-interpreter-exec console "settings set target.env-vars DYLD_LIBRARY_PATH="/Users/vagrant/builds/ninja-release/conan-home/.conan/data/lexactivator/3.12.1///package/98693e2cd8e6a5b0612dd5b0ae31d688615da5b9/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/lexfloatclient/4.3.10///package/98693e2cd8e6a5b0612dd5b0ae31d688615da5b9/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/openscenegraph/3.6.3///package/496c694a158600e9374d6f4ff119717cb4329963/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/cryptopp/8.2.0/bincrafters/stable/package/65b4eeac84096d8cf1459a798c07440f6ed79e3a/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/ccdcsqlite3/3.17.0///package/863dc29f74a5b1da8915b98a222bbcc45e90ce46/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/gtest/1.8.1///package/89353b6e006c1d513020e00f56b6b24bd8163e5d/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/gsoap/2.8.109///package/4bca0050b2fbb691fd93ec5a87cdc464b4cbf097/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/libxl/3.8.2.0///package/fbc9f5348579d8c9e4ba5a008d95280b87ce1e8a/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/inchi/1.04///package/4968af75f822d4742c208cdc37bfd4618fba68cd/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/rstatistics/2.11.1///package/743cf0321be3152777da4d05247a66d1552e70a2/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/csdprotobufs/1.0.117///package/b09b1606af513081c72c033281d3a8b666c2bc74/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/mariadb-connector-c/3.1.11///package/e5367c0e9e837dbe471cdcb23927a9ee1c3a2150/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/pcre/8.41///package/01ffead025ec90a93de23fa980552b4c33618f62/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/openssl/1.1.1i///package/4968af75f822d4742c208cdc37bfd4618fba68cd/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/libxml2/2.9.10///ssssssss""
1: (328) STDERR: MI: Error: Command Args. Validation failed. Mandatory args not found: interpreter, command. Not all arguments or options were recognised: console "settings set target.env-vars DYLD_LIBRARY_PATH="/Users/vagrant/builds/ninja-release/conan-home/.conan/data/lexactivator/3.12.1///package/98693e2cd8e6a5b0612dd5b0ae31d688615da5b9/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/lexfloatclient/4.3.10///package/98693e2cd8e6a5b0612dd5b0ae31d688615da5b9/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/openscenegraph/3.6.3///package/496c694a158600e9374d6f4ff119717cb4329963/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/cryptopp/8.2.0/bincrafters/stable/package/65b4eeac84096d8cf1459a798c07440f6ed79e3a/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/ccdcsqlite3/3.17.0///package/863dc29f74a5b1da8915b98a222bbcc45e90ce46/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/gtest/1.8.1///package/89353b6e006c1d513020e00f56b6b24bd8163e5d/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/gsoap/2.8.109///package/4bca0050b2fbb691fd93ec5a87cdc464b4cbf097/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/libxl/3.8.2.0///package/fbc9f5348579d8c9e4ba5a008d95280b87ce1e8a/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/inchi/1.04///package/4968af75f822d4742c208cdc37bfd4618fba68cd/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/rstatistics/2.11.1///package/743cf0321be3152777da4d05247a66d1552e70a2/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/csdprotobufs/1.0.117///package/b09b1606af513081c72c033281d3a8b666c2bc74/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/mariadb-connector-c/3.1.11///package/e5367c0e9e837dbe471cdcb23927a9ee1c3a2150/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/pcre/8.41///package/01ffead025ec90a93de23fa980552b4c33618f62/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/openssl/1.1.1i///package/4968af75f822d4742c208cdc37bfd4618fba68cd/lib:/Users/vagrant/builds/ninja-release/conan-home/.conan/data/libxml2/2.9.10///ssssssss"`
Hopefully this might be of assistance
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/DebugCompleted","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"16.5.11030.1","VS.Diagnostics.Debugger.HostVersion":"16.5.11030.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.DebugCompleted.BreakCounter":0}},"seq":111}
The text was updated successfully, but these errors were encountered: