question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to show getter evaluation without expanding

See original GitHub issue

When inspecting an object with getters, the old debugger would show the getters as regular properties, evaluating them and showing their return values inline with the rest of the other properties. In this screenshot, all the __debug properties are actually getters on the Node’s prototype:

Screen Shot 2020-04-23 at 11 04 16 AM

In the new debugger, each getter has to be clicked to be evaluated:

MicrosoftTeams-image (5)

Presumably the motivation here is that getters can cause side effects, and it would be horrible if observing a variable in the debugger caused observable effects to your program state. However, in TypeScript, all our getters are pure, and we rely on these __debug-prefixed ones heavily to be able to identify objects at a glance, and those extra clicks add up to a lot of pain.

I would suggest a configuration option that could be set to opt into the old inlining behavior.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
connor4312commented, Jul 1, 2020

We fleshed this out some more today, details in https://github.com/microsoft/vscode-js-debug/issues/548. You will still need pwa-node through the upcoming June release. After that point, the previous debug adapters will be removed and you’ll no longer need to use pwa-node.

We will probably keep the pwa- prefixed-configs around for at least one release to allow for migrations.

1reaction
connor4312commented, Jun 5, 2020

Ah. It looks like this doesn’t work if you use the redirection from the existing Chrome/Node configurations – you have to launch with the pwa-* debug type.

I’m not sure I want to fix that – it adds some extra duplication and dependency to the standalone debug server, and I think that if people are tinkering with their js-debug options they would be satisfied prefixing their launch config until such time as js-debug becomes default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is happening in the console when I look at getter ...
"I'm not sure whether the values you see are evaluated when you console.dir them" - no, it is evaluated when you instantiate theClass...
Read more >
Python's property(): Add Managed Attributes to Your Classes
In this step-by-step tutorial, you'll learn how to create managed attributes, also known as properties, using Python's property() in your custom classes.
Read more >
Expressions in the debugger - Visual Studio - Microsoft Learn
The Visual Studio debugger includes expression evaluators that work when you enter an expression in the QuickWatch dialog box, Watch window, or ...
Read more >
"Without expanding evaluate the determinant `""Delta""
" Without expanding evaluate the determinant `""Delta""=|(1, 1, 1),(a, b, c),( a^2,b^2,c^2)|` ." … Show more. Show more ...
Read more >
07. Extending the ActorSheet class
Document sheets also support a special template() getter method (see the get ... Add the actor's data to context.data for easier access, as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found