-
Notifications
You must be signed in to change notification settings - Fork 36
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
Suggestion: New command dape-info-variable-value-copy #168
Comments
Edit: This comment/problem is now resolved (the updated comment text has the details). However:
Oh, damn... I've just seen that a string value I was copying has been truncated at exactly 1024 chars, so I can't see the whole value. That's not good. Is that a normal DAP thing? Can I configure it?
I see that When I evaluate ...and I think this turns out to be something configurable for the adapter I'm using via ...sweet, got that sorted. FYI, this issue was with - `xdebugSettings`: Allows you to override Xdebug's remote debugging settings to fine tuning Xdebug to your needs. For example, you can play with `max_children` and `max_depth` to change the max number of array and object children that are retrieved and the max depth in structures like arrays and objects. This can speed up the debugger on slow machines.
For a full list of feature names that can be set please refer to the [Xdebug documentation](https://xdebug.org/docs-dbgp.php#feature-names).
- `max_children`: max number of array or object children to initially retrieve
- `max_data`: max amount of variable data to initially retrieve.
- `max_depth`: maximum depth that the debugger engine may return when sending arrays, hashes or object structures to the IDE (there should be no need to change this as depth is retrieved incrementally, large value can cause IDE to hang).
- `show_hidden`: This feature can get set by the IDE if it wants to have more detailed internal information on properties (eg. private members of classes, etc.) Zero means that hidden members are not shown to the IDE. So I added this to the :xdebugSettings ( :max_children 1024
:max_data 16384
:max_depth 64) I'd also expected I could fix this in the xdebug extension config file using https://xdebug.org/docs/all_settings#var_display_max_children but it's not the case -- I can make settings there, and I can verify them in dape's REPL with (That also explains why I'd been seeing an effective limit of 1024 while the xdebug defaults seemed to be only 512.) I can set this in my config with: (let ((xdebug-config (alist-get 'xdebug dape-configs)))
(plist-put xdebug-config :xdebugSettings
'( :max_children 1024
:max_data 16384
:max_depth 64 ))) It might be worth adding some defaults to the standard config, if just for user-visibility of how to configure this. |
I guess the adapter needs to support the (In the absence of that capability, I think it would be reasonable to use something lisp-y.) Based on https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Variables
(Which I might be misinterpreting.) |
Sorry for taking such a long time responding.
Would something like an command for expanding an variable fully then copy pasting from scope buffer be sufficient? Or do you expect something which concatenates the results of an recursive expansion of the variable?
|
I wanted this just now, so I whipped up the following (which I based on the code for
dape-info-variable-edit
).That seems to me like a useful thing.
This version does not handle compound data types, so you could use it to copy the string value of an array element, but not to copy the whole array. I assume this can be fixed, but I've not looked into it yet.
Edit: Looked into it, and... it's a bit awkward -- we have to invent our own syntax for formatting it. Here's a first pass at something more useful than the first version. It's non-recursive, so it's only a first step. Also, the debugger appears to not have access to the expanded value until you've expanded it in the scope window -- at which point it must send a request to the adapter for more information. So you need to do that before copying.
The text was updated successfully, but these errors were encountered: