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

Debugging project in SAP Business Application Studio #990

Closed
stefania-santimbrean opened this issue Feb 9, 2021 · 5 comments
Closed

Debugging project in SAP Business Application Studio #990

stefania-santimbrean opened this issue Feb 9, 2021 · 5 comments
Labels
question Further information is requested

Comments

@stefania-santimbrean
Copy link

Hello,

I created an app using sap-cloud-sdk init and developed it using Visual Studio Code. During the development I debugged the app by using the JavaScript Debug Terminal available in VSCode.

I am currently exploring running the app in Business Application Studio. Running it normally in a Terminal with npm run start:dev works fine in BAS. I haven't found a JavaScript Debug Terminal available, so I tried to configure a launch.json file.

In VSCode the following debugging configuration works perfectly, but in BAS it gets stuck in the preLaunchTask:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Debug App",
            "program": "${workspaceFolder}/src/main.ts",
            "preLaunchTask": "tsc: build - tsconfig.json",
            "outFiles": [
                "${workspaceFolder}/dist/**/*.js"
            ],
            "envFile": "${workspaceFolder}/.env",
            "console": "integratedTerminal"
        }
    ]
}

So my first question is if you recommend a different way of debugging using launch.json file? And my second one is if projects generated with sap-cloud-sdk are compatible with Business Application Studio?

If you can point me to some examples/documentation on this topic, it would be greatly appreciated also.

Thank you,
Stefania

@stefania-santimbrean stefania-santimbrean added the question Further information is requested label Feb 9, 2021
@jjtang1985
Copy link
Contributor

Hi @stefania-santimbrean ,

here is the documentation that might help.

Best regards,

Junjie

@stefania-santimbrean
Copy link
Author

Hello @jjtang1985 ,

Thanks so much for your quick response and the documentation. I tried the launch.json from the docs in VSCode works perfectly, in BAS the app does not start.

Do you happen to know if the dev space from BAS has anything to do with this? Should I have one particular type of dev space? Or if I need any type of extension?

I appreciate the support,
Thank you,
Stefania

@jjtang1985
Copy link
Contributor

Hi @stefania-santimbrean ,

I forwarded your question to my sdk colleagues.
However, since this is a BAS specific question, I'm not sure whether we are able to answer.

Here is the support platform of BAS and the homepage.

Best regards,
Junjie

@stefania-santimbrean
Copy link
Author

Hello @jjtang1985 ,

Thanks for your response! I will close the issue and address it on BAS support!

Kind regards,
Stefania

@FrankEssenberger
Copy link
Contributor

Hello @stefania-santimbrean,

I had also a quick look and since it is working in VSC it must be some difference in the BAS which is based on eclipse theia which is like the open source variant of VSC.

I found also some issue in their repo: eclipse-theia/theia#8930 regarding the preLaunchTask. So I would try the following:

  • Make a very simple hello world app
  • Do all the prelaunch tasks manually
  • See if it starts in the BAS
  • If so try to add things like a npm build in the preLaunch and then the TS one
  • If you experience errors ask the BAS colleagues for their support.

Best
Frank

P.S.: From the BAS docu the dev space should be no problem. It is even listed at Prerequisites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants