PROJECTS NOTES HOME

Debugging a Django app with Emacs and dap-mode

Not much information on this topic

Found this - https://github.com/emacs-lsp/dap-mode/issues/229, asked Seanfarly in person, replied to me under github ticket

Wrote a question in reddit, no response - https://www.reddit.com/r/emacs/comments/1agxcb9/debugging_a_django_app_with_dapmode/

1 Asked in "dape" mode issue log

2 Torstein reply

I've never used Django, so I don't know the specifics. The crux is being able to launch Django from Emacs. Then you can debug anything. AFAICT from https://docs.djangoproject.com/en/5.0/howto/deployment/, Django can both run inside an Apache module and with WISGI and other native Python ways. If you can launch your Django app with python3 <something>, then you can debug it with dape.

> How do you find dape mode so far?

Pretty happy with it so far, it's fairly fast and has some good defaults. I'm not doing Python development full time, sadly, I'm constantly juggling products and technology stacks. Thus, there can be weeks and even months between each time I get to do heavy Python development, in which I need a debugger.

3 Plumber and different tools

ever seen a plumber use the same wrench for all the pipes? Different tools for deferent jobs. Multiple IDE's, code editors for different jobs.

4 Pycharm - Karina

swears by it

Pasak jos pycharm visa tai rodo.

Labas, gal turi kokių gudrybių kaip django pasiekti request, context, args, kwargs, template tags, etc? Viska, kas vaikšto tarp serverio ir client padarius requestus, paspaudus mygtukus admin consoleje ir pan.

Nežinau net kaip įvardinti, nes nežinau ko tiksliai ieškau

Django debug toolbare kažkaip nematau visos visos info

Aš jaučiu, matant tai ir suprantant tai - būtų kaifas. Skraidyciau.

Kazkur dar skaiau, kad pycharm turi built in Django debugging support. lolz..

maybe give pycharm a try? Ask Karina for help to see how to debug, how to see all the variables I need to see. querysets, args, kwargs, request stuff, parameters, etc