-
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
[CPPVSDBG] Debugger truncates long strings when inspecting values #1786
Comments
@aleksijuvani I assume you are using So in your
to make it unlimited. |
@pieandcakes Sorry, I forgot to mention this. I'm using the |
Was there ever a solution to this issue? Seems like the answer above is for gdb and not cppvsdbg. The truncation is a real issue when trying to copy long strings or byte arrays in the local variables list |
@pieandcakes Is there any solution? LLDB also meets this problem, this is unacceptable |
@JemmyWong Any solution for truncation in |
Hello @pieandcakes : Is there any update about this issue ? I've also been using CPPVSDBG for a while and still can't copy large string values. Since I'm not using GDB, I couldn't figure out any kind of parameter that would allow to extend that characters limit. This is really annoying, since copying and analyzing data from the variables tab is one of the major features for a real-time debugger. Thanks in advance for your response ! |
@JoffreyAlto I haven't had time to investigate yet, but it is on my list. |
@pieandcakes Any updates on this issue? :-) |
Just hit this issue myself. It's pretty bad that VS Code doesn't seem to have a nice multi-line string view, but then this just makes it completely useless when debugging strings :) |
run into this matter too, any update now? |
Same here. |
Hi, Do you have any updates for this issue regarding |
@pieandcakes This is an important feature that is not working, first reported in 2018, what's the status update on it, and would it be possible to prioritize this bug? |
Is there a solution to this on Windows when debugging with cppvsdbg using the MSVC debugger? I am running VSCode 1.74.2 on Windows 10. I tried the suggested solution of typing NOTE: That I am trying to debug pure C code using the MSVC debugger components installed from Visual Studio 2019. |
Any update on this issue? Any workaround for cppvsdbg? |
@vijay-563 We don't have an update on this issue. One "workaround" may be to log the string value to stdout or a file. |
@sean-mcmanus Any chance to prioritize this issue, a debugger should be able to inspect long strings. For me, it feels like a high-priority bug |
@jay1975h I'll let the debugger team know that this bug is the most upvoted debugger bug. |
To people here still looking for a resolution, since there's no update on the issue I figured out some kind of way to get copy large strings. Using the "Watch" or "Variable" tab when in debugging feature, identify the string you want to copy then click on the "View binary data" icon, at the right of the string value as showed below. Then now the tab "memory.bin" is open, just copy your value from the "Decoded text" section using your mouse cursor or a simple click at the beginning of the string, and shift+click at the ending of your string. Copy it, then you will be able to paste the string value to another text support. I hope it helps. |
Any updates ? Please prioritize this. |
Same issue here. |
@pieandcakes @sean-mcmanus @VScode @Colengms I don't understand this at all, you wrote that this is most upvoted debugger bug yet nothing happens. The bug was open Apr 4, 2018, why is not being fixed, how can the developers at Microsoft do nothing? You are committed all kinds of useless stuff, for example -> Fix change "eg." to "e.g.". Fix the things that are important instead. |
We have determined that your valuable suggestion has a broad community impact and will improve the product experience. We have added the feature to our roadmap and will keep you updated soon as we make progress. We highly appreciate your contribution in making our product better. |
Is this actually fixed? I still see strings truncated to ~200 characters in hovers, watch & when evaluating the string in the debug console... VSCode: 1.88.1 |
@tklajnscek Are you using cppvsdbg or cppdbg? It's working for me with cppvsdbg. Are you referring to std::string? Which implemention? MSVC? |
It's literally this: # CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(string_test)
add_executable(string_test main.cpp) and: // main.cpp
#include <stdio.h>
#include <string>
void main() {
std::string str = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
const char* cstr = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
printf("str: %s\n", str.c_str());
printf("cstr: %s\n", cstr);
} |
@tklajnscek I see -- I was looking at the data as an array of characters and the characters are all visible in the debugger that way. I'm not sure if that is intentional or not. |
Any chance the original feature actually implemented? |
When inspecting values in the debugger, long strings are truncated, which, for example, makes it impossible to see the rest of this exception message here:
The value is also truncated if I right-click the message on the "variables" window and click "Copy Value". The value also gets truncated in the debug console, if I try printing it there. I don't think there's currently any way to view this string without it getting truncated.
I have the latest stable of VS Code (1.21.1) and vscode-cpptools (0.16.1) installed.
Right now I'm working around this by modifying the code to print the message to
std::cout
before throwing, but that's obviously not ideal..The text was updated successfully, but these errors were encountered: