Debugging TS in WebStorm - debugging

Server starts through gulp. In Run Configuration I've created a JavaScript Debug and set server url. Extension in Chrome is available. As a build system I use Webpack. In Debugging mode I can see that connection is successful but breakpoints are not working.

You need setting up Remote URL mappings in your JavaScript Debug run configuration accordingly. Please see http://richb-hanover.com/debugging-webpack-apps-with-webstorm-2016-1/, https://blog.jetbrains.com/webstorm/2015/09/debugging-webpack-applications-in-webstorm/ for some hints

Related

Unable to connect to web sever IIS Express

I am working on project, where I need to have an access to debugging option.
I've tried to run my application as usually, but this time I received following message:
Unable to connect to web server 'IIS Express'
When I checked the console output I found there following note:
Failed to register URL "http://localhost:49748/" for site xxx application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)
Successfully registered URL "https://localhost:44333/" for site xxx application "/"
I found also that 0x80070020 error - "in the case of IIS Express (or IIS) means that the port that it is attempting to listen on is being used by another process" (link to the similar question).
I can't understand what's happen here. When I try to run this application I'm receiving this error in my Visual Studio, but the application is starting in the background (I can manually navigate to the https://localhost:44333 and app is there). The problem is that I can't debug the code, cause the Visual Studio looks like 'unrelated' to this instance. Previously IIS Express was opening new browser window with URL of the application, and I was able to debugging my code.
I also can't understand why this problem is not appearing for brand new project - I've created new web app project to test this behaviour, and it does what I expect - I can use debugging in VS.
What I've tried to do so far is:
Restart VS,
Restart my local machine,
Change app url in solution explorer/properties/debug,
Remove applicationhost.config from .vs directory
and nothing works for me.
Before this issue appear I forked this repo: https://github.com/jasontaylordev/CleanArchitecture
and downloaded WSL and Docker - I doubt that this have an impact on my solution, but maybe this information will be helpful.
Is there anything what I can change/edit to back to my previous behaviour?
Thanks
I had this issue after upgrading to Windows 10 20H2. There are many answers I found on SO that did not work for me, but I found this blog that helped me figure out the problem. Try running netsh interface ipv4 show excludedportrange protocol=tcp on the command liine and check to make sure that the port you are using is not one of the excluded ports listed. If so, change it to one that is not excluded. I did this and everything worked as normal again.

Start and debug open liberty server from checked out source code

I checked out the source code of open liberty from https://github.com/OpenLiberty/open-liberty and was wondering how to start the server from the sources and deploy an application to the started server.
I found several classes with a main method, but none of them are looking promising so far. My goal is to debug the source code of the open liberty server with a deployed application.
How can I achieve this?
To debug a Liberty server you can do the following steps:
run wlp/bin/server debug myServer. This will halt the server launch process until a debugger is attached on the default debugging port (7777)
Attach a debugger on the debug port
Your IDE should prompt you to "attach sources", and you can select your application source and/or the Liberty source code too

Can't hit breakpoint with new solution configuration

In Visual Studio 2015 I have two solution configurations 'Debug' and 'Services'. I am able to debug and hit breakpoints with the Debug setting, but not with Services.
To isolate the issue, I have tried to make the Services config look exactly like the Debug config. They both build the same projects and are both set for Any CPU. The only difference I can see between the two at this point is their name.
What settings can cause a breakpoint to not be hit when I can do it with Debug but not Services? And when I mean not 'hit', the breakpoint appears disabled when running as Services.
Running as Debug...
Running as Services...
This is usually caused by one of two different problems.
First, you're not creating PDBs for the particular build configuration. To fix, configure Debug Info for PDB only or Full.
Another possible problem is that the current project isn't configured to build for the current build configuration. In the properties for the solution, make sure it's checked for the current configuration.
If these two don't work, close VS, delete all your bin folders, and try again. If you're still stuck, you have a real problem.

Debug tools for node.js app in Bluemix don't seem to work

I have deployed a node.js app in Bluemix using cf push. I have removed the start: entry from manifest.yml. In Bluemix I have set the environment variable BLUEMIX_APP_MGMT_ENABLEto devconsole+shell+inspector. This restages the app.
But when I open the App Manager by adding /bluemix-debug/manage/ I get a 404 error.
When I start Live Edit on the same project from DevOps Services I can open the App Manager. But I don't see what is different, it also seems to set the environment variable only.
What am I missing?
The Live Edit tool will automatically add 256MB to your application to facilitate execution of the additional features, which is likely why it is working with Live Edit.
Manually enabling the feature, however, will not automatically bump up the memory. Can you try adding some more memory to your application and restaging?
There are a couple of other limitations; refer to the Restrictions section on the App Management docs.
EDIT: Found issue in comments below. If command: node app.js is in manifest.yml, or if you are using -c with the CF CLI, it overrides the buildpack's ability to start the development utilities in App Mgmt. This happens even if you have the start command correctly specified in package.json or Procfile. To fix this, remove the manifest.yml entry, delete the application, and restage the application.

RAD 8 does not recognize that WAS has started

I have recently experienced a new problem using RAD 8.0.2. When I launch a WAS server from within RAD, with or without any apps published to it, WAS will start and will show output in the console. I can even access the server from my web browser. However, RAD never recognizes that WAS has started successfully and after the timeout limit is reached, RAD claims that the server failed to start. I have tried this with WAS 6.1 and 7.0 test environments and WebSphere Portal 6.1 external environment and I always get the same result. Naturally, this makes development extremely difficult and I am anxious to get this fixed. Any help would be greatly appreciated! - John
May be an SSL certificate expiration problem, try this
http://www-01.ibm.com/support/docview.wss?uid=swg21514601
I don't think the issue is with RAD 8.0. I had similar issue which is caused by overridden .Metadata properties. Please follow the steps mentioned below.
Close RAD
Kill Java and Javaw.exe on the TaskManager which runs in the background to run eclipse/RAD
Remove the .Metadata properties from the workspace path( Remember when you remove this properties, the workspace settings and the server will be removed from your workspace)
Open RAD as Administrator, it automatically creates .metadata in your workspace path. But, it would be a default (without the workspace settings).
Need to update the user libraries in your workspace and add the servers again( The server settings would be still available as the Server profile was never changed). These settings would update your .Metadata on your workspace.
Try toggling the SOAP and RMI option to see if that helps you.
Sometimes it has trouble and it always works if you switch the protocols that RAD uses to connect to Test envionment server.
Also as a sanity check ensure that the port numbers that are specified in the server configuration in RAD is correct. There are chances that an incorrect port number could be a culprit too.
HTH
Manglu
I could solve the problem by deleting the server profile "AppSrv1" (Windows -> Preferences -> Servers) and by creating a new one using the profile management tool at the same page.

Resources