dape icon indicating copy to clipboard operation
dape copied to clipboard

Fix issues with source tracking when attaching to a dap server over tramp

Open jsadusk opened this issue 1 year ago • 1 comments

I noticed this attempting to use a debugpy project, launched by bazel, on a remote dev machine. dape was receiving paths that were a) missing the tramp prefix, and b) pointing to bazel created symlinks in the sandbox.

I added functionality to dape--path to fix both of these issues. First if a path being resolved is not a tramp filename, attempt to prepend the tramp prefix from dape-cwd (which is empty if dape-cwd is not a tramp path). Second, call file-truename on all paths to resolve any symlinks.

Doing these two changes makes all source tracking work. In addition to this I am manually tunneling the DAP port over ssh, I may add a config to do this as well in a follow up PR.

jsadusk avatar Sep 04 '24 07:09 jsadusk

I realized this doesn't quite work. It breaks setting breakpoints, and I haven't figured out a way to fix that yet.

jsadusk avatar Sep 04 '24 08:09 jsadusk