The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

b0rk: “debugging strategy: jump into a REPL” / Twitter

Posted by jpluimers on 2025/05/28

[Wayback/Archive] 🔎Julia Evans🔍 on Twitter: “debugging strategy: jump into a REPL” (more platforms in the replies to the Tweet)

title: jump into a REPL In dynamic languages (like Python / Ruby / JS), you can jump into an interactive console at any point in your code. Here's how to do it in a frontend Javascript program: 1. edit your code code: ``` my_var = call_some_function() debugger; ``` 2. refresh the page 3. play around in the developer tools console! you can call any function you want / try out fixes! How to do it in other languages: Ruby: `binding.pry` Python: `import pdb; pdb.set_trace()`

title: jump into a REPL

In dynamic languages (like Python / Ruby / JS), you can jump into an interactive console at any point in your code. Here's how to do it in a frontend Javascript program:

1. edit your code

code:
```
my_var = call_some_function()
debugger;
```

2. refresh the page
3. play around in the developer tools console! you can call any function you want / try out fixes!

How to do it in other languages:

Ruby: `binding.pry`
Python: `import pdb; pdb.set_trace()`

--jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.