Cursor opens symbolic links while debugging

I have a symbolic link in /opt/ that points to my project directory, as a shortcut that I can use in bash scripts, the terminal, etc. Sometimes while debugging, Cursor will open files from within /opt/, which can cause confusion with breakpoints, the Ruff formatter, and beyond.

I tried adding /opt/ to .cursorignore (and reindexing), but that didn’t help.

Turns out I had the symlink directory in my PYTHONPATH environment variable. Once I removed that, the problem went away.

1 Like

Great find. Thank you for reporting and solving it by yourself.

Some issues like this one are hard to debug as the specific details that cause are important.