# Interactive debugging is here!

Interactive debugging support has been added to [Multicode.app](https://multicode.app/) and the [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=multicode-app.multicode-app-vscode-debugger).

This upgrades Multicode.app to be a [time travel debugger](https://en.wikipedia.org/wiki/Time_travel_debugging). This means that you can write and debug code (like you would normally), as well as go back in time to see how a certain point was reached, and optionally modify your code while debugging. No need to stop and restart the debugging process in order to make changes. Just modify your code while debugging and let the debugger sync the changes for you, without leaving the debug-experience.

Take for example the following piece of Python code:

```python
transform = lambda v, f : f(v)
times = lambda v : v * 2

value = transform(10, times)

print(value)
```

This piece of code has a `transform` lambda that takes as arguments a value `v` and a function `f`. For the `value` we'll transform the value `10` by applying the `times` lambda. This will essentially double our value, because of the `v * 2`. Let's say we're debugging our code and instead we'd want to know what happens if we did `v * 4` or `v * 10` for example.

Interactive debugging with these modifications are shown here:

![Multicode interactive debugging with Python.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1662123068323/-6JwIpJwW.gif align="left")

When debugging normally you'll see highlights in blue and green, where blue is the current debug line and green is a "parent" debug line, like a function or if-statement that has been stepped into. When "freezing" the debugger the debug lines will be grayed out, allowing you to modify the code, sync the debugger and continue debugging.

All programming languages supported by Multicode (Python, C#, JS/TS & Bash) are available for interactive debugging as well. You can start editing the code straight away while debugging, or press the `Escape` key to "freeze" the debugger manually. You'll then be able to make edits and press the `Sync` button in the toolbar (or press `ctrl+enter`) to trigger the syncing of your code.

We hope this will aid you in getting a better understanding of the code and that it will increase the speed you'll be able to debug!
