Select and execute a block of code in the Sources Panel

Published on Updated on

Select and execute a block of code in the Sources Panel

You can use the shortcut Ctrl + Shift + E to run a block of highlighted code in the Sources Panel. In the clip, I am paused at a breakpoint, and want to access a bunch of variables attached to the this keyword. I select the block where they're defined and change:

this.foo = 'hello'
this.bar = 'world'

Into

foo = 'hello'
bar = 'world'

Finally, I execute that changed block of code so I have foo and bar in scope and can use them while debugging.

Updated on Improve article

Back

Shortcut to select the next occurrence

Next

Set a breakpoint based on a certain condition

This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.