Skip to content

Commit 4b4a95f

Browse files
authored
Merge pull request #1823 from KronicDeth/windows-debugging
Double escape \ in debugger file paths
2 parents eb4270a + aad8f0b commit 4b4a95f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@
224224
* [#1822](https://github.com/KronicDeth/intellij-elixir/pull/1822) - [@KronicDeth](https://github.com/KronicDeth)
225225
* Vendor JInterface 1.11 to support `BIG_CREATION` when debugging.
226226
The JInterface on Maven Central has stopped being updated because [the OTP Team didn't actually maintain it](https://bugs.erlang.org/browse/ERL-928?focusedCommentId=16521&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16521), that was Basho, and Basho is gone now. This version of JInterface, 1.11, is from Erlang 23.0.4 from Homebrew, but with the formula edited (`brew edit erlang`) to add `--with-java` and then built with `brew install erlang --build-from-source`.
227+
* [#1823](https://github.com/KronicDeth/intellij-elixir/pull/1823) - [@KronicDeth](https://github.com/KronicDeth)
228+
* On Windows, the `file.path` to the debugger server files has `\`, but they aren't escaped. Therefore, replace them with escaped version, `\\` to fix debugging on Windows, but leave Linux and macOS unaffected.
227229

228230
## v11.8.0
229231
### Enhancements

resources/META-INF/changelog.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ <h1>v11.81.</h1>
1414
Homebrew, but with the formula edited (<code>brew edit erlang</code>) to add <code>--with-java</code> and then
1515
built with <code>brew install erlang --build-from-source</code>.
1616
</li>
17+
<li>
18+
On Windows, the <code>file.path</code> to the debugger server files has <code>\</code>, but they aren't escaped.
19+
Therefore, replace them with escaped version, <code>\\</code> to fix debugging on Windows, but leave Linux and
20+
macOS unaffected.
21+
</li>
1722
</ul>
1823
</li>
1924
</ul>

src/org/elixir_lang/debugger/Modules.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object Modules {
3232
fun erlArgumentList(mix: Boolean = false): List<String> =
3333
listOf("-eval", "application:ensure_all_started(elixir)") +
3434
copy(mix).flatMap { file ->
35-
listOf("-eval", "'Elixir.Code':require_file(<<\"${file.path}\">>)")
35+
listOf("-eval", "'Elixir.Code':require_file(<<\"${file.path.replace("\\", "\\\\")}\">>)")
3636
} + if (mix) {
3737
emptyList()
3838
} else {

0 commit comments

Comments
 (0)