Skip to content

Keep REPL open after crash #1788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
akosuas opened this issue Nov 20, 2020 · 9 comments
Open

Keep REPL open after crash #1788

akosuas opened this issue Nov 20, 2020 · 9 comments

Comments

@akosuas
Copy link

akosuas commented Nov 20, 2020

I've got some code that segfaults (due to my stupidity, nothing to do with vscode). Unfortunately, when the REPL crashes, vscode seems to immediately close it, making it difficult to actually inspect the trace and work out what is going on. Is there a way to prevent vscode from closing the terminal automatically after it exits?

@goretkin
Copy link

I'd also just like to more easily terminate the REPL (e.g. with Ctrl D) and have the option to restart it without it closing and then having to re-issue the VS Code command "Julia: Start REPL".

As far as I know, julia-vscode would then match the behavior in Juno:

image

@davidanthoff davidanthoff added this to the Backlog milestone Feb 21, 2021
@oschulz
Copy link

oschulz commented Sep 10, 2021

This would be really helpful. Had some crashes lately that forced me to start a separate terminal so I could see why things crashed.

@anandijain
Copy link

the current workaround is setting "julia.persistentSession.enabled": true, then you can see the trace on segfaults

@goretkin
Copy link

I haven't tried that setting yet. In what sense is it a workaround? What does it do?

@pfitzseb
Copy link
Member

It runs Julia inside of a tmux session that's configured to stay alive even if the Julia process dies.

The more lightweight solution would be to point VS Code to a script like

#!/bin/bash 

JULIA=j1

if [ -z "${JULIA_LANGUAGESERVER}" ]; then
    ${JULIA} "$@"
    ret=$?
    if [ $ret -ne 0 ]; then
        read -rsn1 -p"Julia just crashed with $ret. Hit Enter to continue...";echo
    fi
else
    exec ${JULIA} "$@"
fi

@LilithHafner
Copy link

the current workaround is setting "julia.persistentSession.enabled": true, then you can see the trace on segfaults

The REPL crashes on launch with that setting for me.

@mikkoku
Copy link

mikkoku commented Apr 11, 2022

I have the same problem, but on Windows the workarounds don't work.

@IanButterworth
Copy link

I recall there being an upstream FR for supporting this in vscode but I can't find it. It'd be good to link it here if so

@pfitzseb
Copy link
Member

microsoft/vscode#70444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants