![Umar Hansa](https://web.dev/images/authors/umarhansa.jpg) Umar Hansa [X](https://twitter.com/umaar) [Homepage](https://umaar.com/)

<br />

![Select and execute a block of code in the Sources Panel](https://developer.chrome.com/static/blog/select-and-execute-a-block-of-code-in-the-sources-panel/image/select-execute-block-c-55c919e04b09e.gif)

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:

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

Into

```javascript
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.