# Any way to save variables to WorkSpace from the Debug Console in VSCode?

**URL:** https://discourse.julialang.org/t/any-way-to-save-variables-to-workspace-from-the-debug-console-in-vscode/84933
**Category:** VS Code
**Tags:** debugger
**Created:** [July 28, 2022, 7:02pm UTC](https://discourse.julialang.org/t/any-way-to-save-variables-to-workspace-from-the-debug-console-in-vscode/84933 "2022-07-28T19:02:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)
#### Post date: [July 28, 2022, 7:02pm UTC](https://discourse.julialang.org/t/any-way-to-save-variables-to-workspace-from-the-debug-console-in-vscode/84933/1 "2022-07-28T19:02:42Z")

</div>

I seem to be able to edit existing workspace variable values from the debug console, but I am not able to define new variables.

![image](https://global.discourse-cdn.com/julialang/original/3X/2/8/28d26a352499daf97dce15895794d9998ba34632.png)

![image](https://global.discourse-cdn.com/julialang/original/3X/9/9/99c7b60444bdf607277849d58c86d26507245eed.png)

I want to be able to test and play with the next line after my breakpoint before actually stepping the debugger and erroring out my whole session, but this limitation makes it difficult.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/9/2994da4cd0d855a90a6cfd2e4662b89d724c3aa8.png)

Is there any way to get a full REPL session with the environment as it would be inside some nested function?

---

<div class="post-metadata">

### Author: ![Roman\_Nefedov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roman_nefedov/32/202530_2.png) [@Roman\_Nefedov](https://discourse.julialang.org/u/Roman_Nefedov)
#### Post date: [March 15, 2024, 3:07pm UTC](https://discourse.julialang.org/t/any-way-to-save-variables-to-workspace-from-the-debug-console-in-vscode/84933/2 "2024-03-15T15:07:20Z")

</div>

putting the `global` keyword before variable definition is a workaround
