Python Repls do not offer a debugger tool after Nix conversion

Bug description:
Every Python repl should support the debugger

Expected vs Current Behavior:
There is no “debugger” tool in this repl, but other repls that appear the same (especially to new users/students) do not offer a debugger

Steps to reproduce:
click the repl https://replit.com/@cstutormarin/cs138loopswhiletruepromptpractice
, fork it, try to debug

compare to this link (which does have a debugger)
https://replit.com/@cstutormarin/cs138mathmodulooperatorpracticesolution

Bug appears at this link: https://replit.com/@cstutormarin/cs138loopswhiletruepromptpractice

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Replit Profile: https://replit.com/@cstutormarin

You can add a debugger to your python repl manually.

To add a debugger:

add this piece of code to your .replit file:

[debugger]
support = true

  [debugger.interactive]
  transport = "localhost:0"
  startCommand = ["dap-python", "main.py"]

    [debugger.interactive.integratedAdapter]
    dapTcpAddress = "localhost:0"

    [debugger.interactive.initializeMessage]
    command = "initialize"
    type = "request"

      [debugger.interactive.initializeMessage.arguments]
      adapterID = "debugpy"
      clientID = "replit"
      clientName = "replit.com"
      columnsStartAt1 = true
      linesStartAt1 = true
      locale = "en-us"
      pathFormat = "path"
      supportsInvalidatedEvent = true
      supportsProgressReporting = true
      supportsRunInTerminalRequest = true
      supportsVariablePaging = true
      supportsVariableType = true

    [debugger.interactive.launchMessage]
    command = "attach"
    type = "request"

      [debugger.interactive.launchMessage.arguments]
      logging = {}

enter this command in the Shell:

pip install debugpy

Thanks Alex - it is good to know this bug has a work around!

I still consider these bug to be pretty bad, esp since as Replit is supposed to be an intuitive tool for beginners, so needing to hack the repl due to the NIX conversion seems weak. Given that the NIX conversion already takes multiples of minutes, adding the need to edit every python repl to make this change seems like a “negative” for the NIX conversion from a user-benefits perspective. I would think that if the repl had a debugger option prior to conversion, then it should have one after. The NIX conversion afterall provides no benefits to new users (especially students). The defacto answer (from their perspective) is that replit does not offer a debugger for Python, while other IDE’s do. Bottom line for me is that this is just a poor UX, esp when these same repls had this in the past , and now the feature is mysteriously missing. I’m really hoping replit takes the initiative to clean up some of the mess created by the NIX conversion (this is just one of them)

1 Like