facebook

Debug from launch.json works, but when hitting Chrome button on file editor no

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #653671 Reply

    beleta1
    Participant

    When pressing Chrome debug button or Angular Debug Panel / Debug in Chrome I got this message “It’s not currently possible to debug this file. Is the server running?”.

    But if I use the launch.json file to start the debugging session it works with no problem.

    #653677 Reply

    Aaron Lara
    Member

    Hello! So the error indicates that the server on which the project might not be running. You can see if the server is running in the Servers View.

    Do you see it running when using the “Debug in Chrome” button?

    Cheers!
    Aaron Lara

    #653678 Reply

    beleta1
    Participant

    As I said using launch.json it works, so obviously the server is running!

    #653679 Reply

    Aaron Lara
    Member

    Sorry about that. Using launch.json has a slightly different cycle. It opens up chrome even if the server is not running so that’s why I want to confirm you see the app running from the servers view.

    Another question is, how did you start the server? Did you do it by using “Serve Application” in the Control Panel or by issuing a command in the terminal?

    #653680 Reply

    beleta1
    Participant

    From de Control Panel.

    Attachments:
    You must be logged in to view attached files.
    #653683 Reply

    Aaron Lara
    Member

    Thanks for the Screenshot. It’s possible that the debug in chrome action is not calculating the right URL so it thinks the server is not running. You can try the following:

    1. Right click on the project > Properties.
    2. Navigate to CodeMix > Miscellaeous > Live Preview
    3. Check “Always use this URL” and set the right URL (http://localhost:4200/)
    4. Apply and Close

    Try again after setting this.

    #653696 Reply

    beleta1
    Participant

    Well, I tried this and at first always appeared the dialog asking for the URL, now I don’t know what change I made that the “server running” shows again. It seems that this functionality needs a little reworking, for instance:

    1) You don’t let putting the context in the URL, that makes not sense. In the launch.json there is no problem in putting it.
    2) Why ask for three different URLs the only important is the project one.
    3) Things must work.

    Ok, thank for your help, I’ll continue using launch.json.

    Jose M Beleta

    #653697 Reply

    Aaron Lara
    Member

    Sorry for the inconvenience. It would be really useful if you could expand on the issues you listed.

    1. Can you share some Screenshots so we could see what URL fields you are referring to? Is it on the Live Preview preference page?.
    2. What kind of context do you want to add to the URL? (like adding more parameters?).
    2. Where do you see asking for three different URLs? (on which dialog/view).

    Also, we might be able to get more data if you reach out by using Live Chat (help > CodeMix > Live Chat). We have some tools there that help us debug different issues.

    #653710 Reply

    beleta1
    Participant

    1) Yes and in the dialog of the screenshot I am including.
    2) Basically context, for instance http//localhost:4200/MyApp, MyApp is the context. This way the browser opens in the app. This can be done in launch.json.
    3) I attached the dialog that asks for 3 URLs!

    Is late here in Spain to do a Live Chat. Perhaps monday.

    Attachments:
    You must be logged in to view attached files.
    #653712 Reply

    Aaron Lara
    Member

    I see what you mean. Regarding:

    2) It should let you use that URL if you set it, how does it fail? Maybe it fails right now since it doesn’t detect the server running?

    3) The Behavior combo is so you can decide if the same URL is used for the different levels of your project (file, folder, project). This is especially useful when in the context of the Live Preview Browser so the URL is always in sync with the currently open file. If the URL doesn’t need to change you can just choose “Use the URL for all files in this project” (AKA, no need to specify 3 URLs).

    #653861 Reply

    beleta1
    Participant

    I am including a screenshot of the whole Eclipse workspace. It shows my project CarverConsumosAngular, the Servers window that shows that the server is running, the file I am editing, the launch.json file, and the Error Log window.

    I have several scenarios:

    1) Starting the debug session from launch.json always works independently of the URL set.
    2) Live Preview setting “Derive URL from…” checked some times works, some times shows this error in the Error Log “Can’t find code launch handle for /Users/beleta/eclipse-workspace/CarverConsumosAngular/.vscode/launch.json with configuration name: Launch Chrome localhost”.
    3) Live Preview setting “Always use this URL” to http://localhost:4200/CarverConsumos”: Chrome button disappear and pressing Debug in the Angular Control Panel results in “It’s not currently possible to debug this file. Is the server running?”..
    4) Live Preview setting “Always use this URL” to http://localhost:4200″ shows dialog “Configure Target for …” but after that same result as point 2.

    It depends on closing and reopening the edited file too.

    A nightmare.

    Attachments:
    You must be logged in to view attached files.
    #653873 Reply

    beleta1
    Participant

    I forgot to add the stack trace for the error mentioned in point 2.

    However here is about Eclipse launch configuration the other message was about the launch.json file.

    Anyway, both files exist.

    org.eclipse.debug.core.DebugException: Launch configuration Launch Chrome localhost at file:/Users/beleta/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/Launch%20Chrome%20localhost.launch does not exist.
    at org.eclipse.debug.internal.core.LaunchManager.createDebugException(LaunchManager.java:886)
    at org.eclipse.debug.internal.core.LaunchManager.getInfo(LaunchManager.java:1380)
    at org.eclipse.debug.internal.core.LaunchConfiguration.getInfo(LaunchConfiguration.java:489)
    at org.eclipse.debug.internal.core.LaunchConfiguration.getAttribute(LaunchConfiguration.java:440)
    at com.genuitec.eclipse.code.debug.CodeLaunchManager.findLaunchHandle(CodeLaunchManager.java:97)
    at com.genuitec.eclipse.code.debug.ui.AbstractDebugLaunchShortcut$1.run(AbstractDebugLaunchShortcut.java:351)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

    • This reply was modified 4 years, 7 months ago by beleta1.
    Attachments:
    You must be logged in to view attached files.
    #654713 Reply

    Aaron Lara
    Member

    I’m sorry that you are getting into these issues. Thanks for all the information provided, it’s really helpful. I have created a bug to work on a fix in this area. Please stay tuned.

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Debug from launch.json works, but when hitting Chrome button on file editor no

You must be logged in to post in the forum log in