BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
256 stars 39 forks source link

Wiki Installation instructions for SDK location #715

Closed velara3 closed 9 months ago

velara3 commented 9 months ago

On following install instructions for the first time, on the following page please add a link to download the sdk,

"Download Apache Royale here, if you don't have it yet. Then restart VS Code"

If you install only the extension, the sdk will not be listed in the command palette.

image

Note: I don't know where the JS only option is coming from. I had Royale installed at one point.

Also, on this page, https://github.com/BowlerHatLLC/vscode-as3mxml/wiki/Create-a-new-ActionScript-project-in-Visual-Studio-Code-that-targets-JavaScript-and-HTML, there were two errors from the extension in the problems view:

velara3 commented 9 months ago

Additionally, an instruction video may help new users.

velara3 commented 9 months ago

Additionally, on this page, the Debugger for Chrome has been deprecated. It appears that it is replaced with an already installed VS code extension JavaScript Debugger. The instructions may be different.

Following the instructions as if the extension was installed has resulted in: "Unable to Launch Browser"

image

Adding the absolute path to the browser opened the browser but resulted in "Unable to attach to browser",

image

After pointing to a chrome browser it launched with the following, "Cannot GET /index.html" but in VS code it looks like it attached.

image image

When I pointed to the, "/bin/js-debug/" sub directory, "http://localhost:5500/bin/js-debug/", the breakpoint in the Main.as file hit.

image

A message to the console when loading the page:

image

It seems the webRoot value is not being applied.

joshtynjala commented 9 months ago

On following install instructions for the first time, on the following page please add a link to download the sdk,

All of the supported ActionScript SDKs are linked at the top of that page. vscode-as3mxml supports more than just Royale, and there are links to the AIR SDK, Flex SDK, and the Feathers SDK too.

Note: I don't know where the JS only option is coming from. I had Royale installed at one point.

The extension automatically searches a few common places where the SDK might be found, including Flash Builder's installation location, the PATH environment variable, FLEX_HOME, ROYALE_HOME, and possibly a couple more. It looks like you installed Royale from npm, which is automatically added to the PATH.

there were two errors from the extension in the problems view

Interesting! I can reproduce this issue. I'll try to get it fixed.

joshtynjala commented 9 months ago

Additionally, on this page, the Debugger for Chrome has been deprecated. It appears that it is replaced with an already installed VS code extension JavaScript Debugger. The instructions may be different.

You are correct. The Debugger for Chrome extension is deprecated for the built-in JavaScript debugger. I removed the step that said that Debugger for Chrome should be installed. After that, I was able to follow all of the steps successfully with no changes required (though, just to be more clear, I mentioned that if you want to debug from a web server, you need to start it yourself). Chrome launched without specifying runtimeExecutable and breakpoints in the Main.as file were recognized correctly.

joshtynjala commented 9 months ago

At this point, I consider everything resolved. If you want to try the fix to creating a new project, you can download the latest nightly build from GitHub Actions, or you can build it yourself, if you prefer.

velara3 commented 9 months ago

I did get the debugger to work. But I had to add the path in "webRoot": "/bin/js-debug" to the end of the url (full url - "localhost/bin/js-debug/") in the browser for it to work. It immediately hit the breakpoint. It works great btw.

velara3 commented 9 months ago

Side Note: Upon clicking on the Global variables text OSX displayed a message about microphone access:

image

FWIW the global variables had objects that looked like the chrome and extensions. So it may have been VS Code extensions.