MicrosoftEdge / JsDbg

Debugging extensions for Microsoft Edge and other Chromium-based browsers
MIT License
177 stars 33 forks source link

Allow truncating path to variables #126

Open cbiesinger opened 5 years ago

cbiesinger commented 5 years ago

Today I wanted to show a member variable in the tree with a fairly long path: Layer.scrollablearea.raw_.scrollbarmanager.v_bar_isattached:false

This takes up a lot of horizontal space... can we allow truncating them? Or always truncate in the middle when they get long enough, or something?

sanketj commented 5 years ago

Interesting idea!

For long paths, we could do something like: add a "..." in the middle and the show the full path when the user hits alt+click.

The question though is when do we decide to show the "...". After we expand through a certain number of fields? After we cross an arbitrary path size? Or would it have to vary based on window size? I'm not sure what the right answer is here.

sanketj commented 5 years ago

@petersalas , have you ever thought about this?

petersalas commented 5 years ago

Yeah, it can definitely be problem, especially when multiple fields are being showed and it's embarrassingly bad when it's a.really.long.sequence.of.objects.ending.in.fieldA and a.really.long.sequence.of.objects.ending.in.fieldB.

The ideas around trimming sound good to me...maybe elide fields between 2 and N-1?

sanketj commented 5 years ago

@cbiesinger @petersalas , do we still want this now that we have #155 ?

cbiesinger commented 5 years ago

You could certainly make an argument either way but I'm leaning towards keeping this open because it would be helpful to conserve screen width when showing multiple variables with long paths