Skip to content
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

"Couldn't resolve AHK v2 interpreter" message when debugging something unrelated to AHK #493

Closed
RandScullard opened this issue Sep 2, 2024 · 11 comments · Fixed by #566
Closed
Assignees
Labels
bug something isn't working debugger issues with debugging code

Comments

@RandScullard
Copy link

Description

Since AHK++ v6 was installed, every time I start debugging a C# project in VS Code, I get this notification popup:

AutoHotkey interpreter not found, check settings: AHK++.v2.file.interpreterPath

This is in a workspace with no AutoHotkey files, totally unrelated to AutoHotkey. I don't have AHK v2 installed - I am still on v1 and don't plan to upgrade anytime soon.

Reproduction steps

Steps to reproduce the behavior:

  1. Open a C# workspace
  2. Start debugging

Expected behavior

Expected not to get any notifications related to AHK++. I think the AHK++ extension should check whether you are debugging an AutoHotkey script before it looks for the AHK interpreter. I couldn't find anything in the AHK++ docs about support for v1, but it seems to still be supported, so it's not clear if having v2 installed is a requirement.

@RandScullard RandScullard added the bug something isn't working label Sep 2, 2024
@mark-wiemer mark-wiemer added this to AHK++ Sep 2, 2024
@mark-wiemer
Copy link
Owner

Hmm, sorry about that. How exactly are you starting debugging--via keybinding, command palette, GUI, something else? In the short term, you can disable AHK++ for the C# workspace so that it doesn't interfere.

I'll put this near the top of the backlog :)

image

@mark-wiemer mark-wiemer moved this to Todo in AHK++ Sep 2, 2024
@mark-wiemer mark-wiemer added the debugger issues with debugging code label Sep 2, 2024
@RandScullard
Copy link
Author

It happens whether I start debugging via a keybinding or the command palette. However, I just noticed that it only happens the first time I start debugging after loading a particular workspace. So I can go in and out of the debugger without additional popups appearing. Which is good - this is only a minor annoyance.

@RobbyMeeker
Copy link

Yeah same issue. It also happens even without debugging anything. I get the error message on every startup. v2 is not installed, only v1.

@Identifier
Copy link

Same here. Have uninstalled this extension and switched to one of the other AutoHotkey extensions until this is fixed.

@CatBraaain
Copy link

after a patience, finally I installed ahk2 just to prevent the message

@mark-wiemer
Copy link
Owner

Thanks for the feedback and sorry for the inconvenience. I should have a fix for this published next week.

@mastrodaro
Copy link

I am not using v2, the message about interpreter appear and "Go to definition" stopped working:

image

I get this extension updated yesterday and can't use it since then.

@mark-wiemer
Copy link
Owner

Hi @mastrodaro, please open a new issue. And please try downgrading back to 6.3.0 to see if that mitigates the issue:

image

@mark-wiemer
Copy link
Owner

mark-wiemer commented Nov 5, 2024

Just an FYI, the AHK interpreter is also used to provide completion suggestions, hover text, and a bit more. So missing the file is a bit of a problem. However, I will still work to:

  • add a setting to disable this warning,
  • add a second setting disable the AHK v2 LSP for folks entirely (if they're still using v1 and don't plan to upgrade), and
  • improve the recognition of the AHK v2 interpreter path (current code ignores symlinks, causing AHK v2 Store Edition support #496)

For this week's hotfix, just expect a clearer error message and a setting to disable such warnings in the future. The error will still appear by default but once marked as ignored should never appear again.

@mark-wiemer mark-wiemer moved this from Todo to In Progress in AHK++ Nov 5, 2024
@mark-wiemer
Copy link
Owner

Note to self: As of 6.4.0, the error text starts with "Couldn't resolve AHK v2 interpreter, please check settings:", it's from ahk2/server/src/localize.ts

@mark-wiemer
Copy link
Owner

Hi all, please try out this release early! Unless major bugs are found, I'll be testing and releasing tomorrow morning (~16 hours from now)

vscode-autohotkey-plus-plus-6.4.1-rc1.zip

Rename .zip to .vsix and follow the new https://github.com/mark-wiemer-org/ahkpp/blob/main/docs/InstallFromVSIX.md guide :)

If you don't trust this comment, that's OK, but I hope you can see by the guide that I intend to share more releases like this to work around the current registry limitations with pre-release version numbering.

Thanks again for your patience on this one, I know it was annoying

@mark-wiemer mark-wiemer changed the title "AutoHotkey interpreter not found" message when debugging something unrelated to AHK "Couldn't resolve AHK v2 interpreter" message when debugging something unrelated to AHK Nov 9, 2024
@mark-wiemer mark-wiemer unpinned this issue Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working debugger issues with debugging code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants