Debugging remote Vue application with IntelliJ
I have a situation where I need to debug a Vue.js application (FWIW, Vue 2.6.14) with IntelliJ (2024.1.1). I am using Typescript, and Vue single file components. Also, I am debugging remotely, via SSH to a local development container. I have set things up so that Webpack generates source maps for Chrome, so I can currently debug within Chrome, however, it's not ideal:
- The source mapping process generates multiple files for a single SFC and finding the right one is a bit of guesswork;
- The line numbers for the source-mapped file obviously don't match with what's in the original Vue file so setting breakpoints can sometimes not be straightforward.
I would like to be able to debug natively within IntelliJ, for obvious reasons.
Developing remotely means that I have Windows-based client that connects to the Linux-based host version of IntelliJ running in the container. Therefore there are challenges in getting debugging to work with a Windows-based browser. It would be nice if IntelliJ solved this problem natively.
I have tried the following with little success:
- Using a Chromium-based browser in the development container. For various reasons, it is quite difficult to get Chromium to run within the container that I'm using. This would be ideal as the browser would be running in the same “environment” as the IntelliJ instance, but sadly, no dice. In addition, the product I'm working on is supposed to work against the Windows version of Chrome, not the Linux version (I'm aware that there shouldn't be any differences, but never-the-less).
- Using Chrome on the host (Windows) and doing various proxying tricks to get the debugging connection on the host IntelliJ to connect to the Windows Chrome instance. I spent a considerable amount of time trying to get this to work—no dice.
In any case, as a product I would expect IntelliJ to have this facility built-in natively. Indeed, it's true that one can do this today using VSCode! I know that IntelliJ supports the development container standard up to a point, but I believe that it is still not compatible with the development containers produced by VSCode.
请先登录再写评论。
Hello,
Please take a look at this issue: https://youtrack.jetbrains.com/issue/WEB-65534
If it's what you mean, please vote and comment for it.