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

launch.json file #38

Closed
pmohanakrishna opened this issue Dec 22, 2016 · 2 comments
Closed

launch.json file #38

pmohanakrishna opened this issue Dec 22, 2016 · 2 comments
Labels

Comments

@pmohanakrishna
Copy link

Is it mandatory to create launch.json file under vscode folder or can we create directly as other files? folder name also should be same vscode?
how does it know server details first time while creating launch.json file? what if we have multiple servicetiers?

@pmohanakrishna
Copy link
Author

and what are these parameters in launch.json? are they mandatory? can be changed?
"name": "Publish",
"projectRoot": "${workspaceRoot}",
"packageFileName": "${command.resolvePackageFileName}",

@defr0std
Copy link
Contributor

Yes, the the launch.json file must be located inside the .vscode folder. This is just how VSCode works.
If you don't have a launch.json file (or have it in a wrong location), then next time you press F5, VSCode will offer you to create a new one and will place it where needed.

The server details are currently initialized to static values (localhost, Navision_main, etc). This is done for easier setup on the gallery image, but may change in the future when the extension becomes globally available.

About other parameters:

  • "name" can be customized, this is just for you to identify the configuration
  • "projectRoot" and "packageFileName" point to project folder and the name of the .navx file which should be deployed. ${} syntax means that values will be resolved at runtime. Typically you should not change these, but if you put correct paths there, it should work as well.

By the way, you can have multiple configurations in the launch.json file, see an example below. Then if you switch to Debug pane in VSCode (Ctrl+Shift+D), you would be able to select an active configuration in the top-left corner.

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "al",
            "request": "publish",
            "name": "Publish to main",
            "projectRoot": "${workspaceRoot}",
            "packageFileName": "${command.resolvePackageFileName}",
            "server": "http://localhost",
            "serverInstance": "Navision_main",
            "windowsAuthentication": true
        },
        {
            "type": "al",
            "request": "publish",
            "name": "Publish to other server",
            "projectRoot": "${workspaceRoot}",
            "packageFileName": "${command.resolvePackageFileName}",
            "server": "http://localhost",
            "serverInstance": "Other",
            "windowsAuthentication": true
        }
    ]
}

@microsoft microsoft locked and limited conversation to collaborators Apr 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants