Debugging Air Project when not at the root folder #671
-
I have a repo where it has multiple folders. Most of the folders represent a different project where I build flex modules (swc). I also have a folder with an Air application that ultimately uses those modules. When I tried to debug, I could not figure out how to get the debugger or launch.json to recognized the app in the folder. Instead, I needed to open that folder separately inside a new VSCode window in order to debug. It's a decent work around, but not idea. Is there a way to get this to work otherwise? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It is possible to debug when you open a common parent folder as the root of a workspace, but you'll need to configure your .vscode/launch.json file manually. I think the only thing you are required to do differently is set the {
"type": "swf",
"request": "launch",
"name": "Launch SWF",
"program": "appfolder/bin-debug/MyProject-app.xml"
} See this page for all available fields of the swf debugger. There is another way, though, and I would even argue that this approach is better. Right now, you're opening the common parent folder that contains all of your individual projects. Instead, start by opening your app project folder directly. Then use VSCode's Add Folder to workspace for each individual library project. Then, use VSCode's Save workspace as to create a .code-workspace file. Each project will be a separate root folder, and you can create .vscode/launch.json directly in the app project, and it will be auto-configured from your asconfig.json without setting any fields manually. |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks so much. Looks like I have some options to choose from. I
appreciate you time in writing this all out for me.
…On Thu, Feb 23, 2023 at 1:17 PM Josh Tynjala ***@***.***> wrote:
Although, if you decide to go with a multi-root workspace, I don't think
it will be compatible with your use of dependsOn in tasks.json
<#670 (comment)>,
since the individual workspaces won't know about each other's tasks. It's
an unfortunate tradeoff.
I prefer multi-root workspaces, so for one of my apps, I just added the
libraries to the app project's source-path instead of compiling them to
SWC first. Since it would have needed to recompile the library SWCs in
VSCode every time anyway, it is actually a bit faster to launch the
compiler only once.
—
Reply to this email directly, view it on GitHub
<#671 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABTYRXXTGONAAPTFCWWWFDWY6STFANCNFSM6AAAAAAVFBFQS4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
It is possible to debug when you open a common parent folder as the root of a workspace, but you'll need to configure your .vscode/launch.json file manually. I think the only thing you are required to do differently is set the
program
field:See this page for all available fields of the swf debugger.
There is another way, though, and I would even argue that this approach is better. Right now, you're opening the common parent folder that contains all of your individual projects. Instead, start by opening your app project folder directly. Then use VSCode's Add Folder to works…