I have upgrade my project from react-native 0.57.8 to 0.59.3. Follewed theses changes https://github.com/react-native-community/rn-diff-purge/compare/version/0.57.8...version/0.59.3
The problem is - when I try to run project on IOS simulator I have
No bundle URL present
But when I remove this condition from AppDelegate.m file
And left just return
[[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:#"index" fallbackResource:nil];
Problem dissapears. So the question is why DEBUG condition does not work
UPD: it is not relative to Updating (because I checked at previous build and DEBUG condition does not work)
UPD2: I checked my commits and understood that after installing 'react-native-onesignal' it became to always run release version even if it is set to debug at my app schema
Can you check in XCode's Build Settings if DEBUG key exists under Preprocessor Macros? If not expand it and for Debug field add DEBUG=1.
See this image Preprocessor Macros example
Related
I'm maintaining a Vue2 project in which I've recently upgraded #vue/cli-service to version 5.0.4 (from 4.5.0).
Now I've noticed that I can't use my browser devtools to debug the app anymore. Specifically, when I open the devtools and press CTRL+P and type App.vue, the browser opens a compiled version of that file. Previously, it would open the original source file and allow me to place working breakpoints in that file.
This problem occurs in Chrome, Edge, and Firefox.
This problem even happens to the default project scaffold generated by the latest #vue/cli (version 5.0.4 also), with typescript and babel disabled (eg the project generated using vue create testProject).
As a matter of fact, this problem even happens to the default Vue3/Vite project scaffold generated by npm init vue#latest. With or without typescript. I have no idea how anyone in the Vue ecosystem are debugging their projects anymore.
I've already tried setting configureWebpack.devtool = 'source-map' - that hasn't had any effect.
Am I doing something wrong?
This is working for me. I tried to reproduce (npm init vue#latest). When I hit ctrl-p, the first App.vue that's suggested is, as you say, a compiled version. But if you keep hunting down the list, look for the App.vue that has a directory path after it, and you should see your source and be able to put breakpoints. I also like to open my source directory in the filesystem sub-tab of the sources tab in devtools, and this works fine as well, breakpoints included.
I've setup PhpStorm to use the JavaScript debugger. When I run yarn hot, the exception are properly caught.
Unfortunately, it's also catching exceptions in node_modules and I would like to avoid that.
I've tried to add different things in the Settings -> Build, Execution, Deployment -> Stepping -> Do not step into scripts:
webpack:///./node_modules/module/v-table/dist/v-table.common.js
webpack:////./node_modules/module/v-table/dist/v-table.common.js
v-table.common.js
./node_modules/module/v-table/dist/v-table.common.js
/node_modules/module/v-table/dist/v-table.common.js
./node_modules/module/v-table/dist/*
*
I've also tried to blackbox these scripts in Chrome.
Nothing appears to work.
My question here is more, is it even possible to have a working JavaScript debugger with PhpStorm and JavaScript? Is one of you using it?
there is currently no way to filter out exception breakpoints; please vote for WEB-30378 to be notified on any progress with it
I am experiencing different behaviour when using Chromium's --enable-logging flag as part of a NW.js application. On a Windows 10 machine, specifying the logging flag as part of the package.json "chromium-args": "--enable-logging --v=1" spawns two extra prompt windows in addition to the main window.
Searching the Chromium documentation suggested adding the --no-sandbox flag would solve this issue. Adding it to the package.json file did not change the behaviour.
However, providing the logging flag through the command line and not in the package.json file yields the desired result.
"App Name.exe" --enable-logging --v=1
The log file is generated as expected and no extra windows are spawned on launch. Why is there a difference when I specify the argument on the command line vs. in the chromium-args section of the package.json file? And secondly, how can I get the desired behaviour by specifying everything in the package?
Using NW.js version 0.16.1
The azure-functions-cli offers a way to kickoff debugging, but these instructions seem to be Visual Studio specific.
I tried using a similar trick to serverless by setting up a run config in WebStorm to point the JavaScript file to:
\node_modules\azure-functions-cli\lib\main.js
And then passing the Application args:
run myFunctionName --debug
This successfully runs the functions with Azure's tools, but both WebStorm tries to set a debugging port; and when the Azure window opens up it sets its own debugging port.
From Webstorm:
C:\Program Files (x86)\JetBrains\WebStorm 2016.2.3\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" --debug-brk=60168 --expose_debug_as=v8debug C:\Users\username\AppData\Roaming\npm\node_modules\azure-functions-cli\lib\main.js run myfunction --debug
Debugger listening on [::]:60168
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException:
Likewise, Azure-cli says it opens a debugging port, but they do not match.
As a result, breakpoints set are ignored when the functions are called (Though it does successfully run).
Anybody know how to configure this properly to be able to use WebStorm to debug?
Azure-Functions-CLI was renamed to azure-functions-core-tools. If you still have the Azure-Functions-CLI see my legacy response at the end of this post.
If you're running the new azure-functions-core-tools it looks like they broke the capability to run a remote debugger :-(.
I have the following issue opened and I will update if they tell me otherwise:
https://github.com/Azure/azure-functions-core-tools/issues/378
Fortunately, the new Beta version of the azure-functions-core tools doesn't have all of this C# craziness that prevents it from running on other OSes and requires a remote debugger. To install that version, you can use:
npm i -g azure-functions-core-tools#core
With that version installed, you can launch things with the good 'ol standard Node runtime.
Within WebStorm from Run -> Edit Configurations create a new "Node.JS".
Give the debugging some type of name.
Set the JavaScript file to:
~\AppData\Roaming\npm\node_modules\azure-functions-core-tools\lib\main.js
NOTE: The above assume you installed Azure Functions on a Windows machine with the global flag.
Set the Application Parameters to: start --debug VSCODE
Edit the file ".vscode\launch.json" and change the debug port to 9229 for node.
Within WebStorm choose Run-> Debug:"What_You_Named_the_Remote_Profile"
Add some breakpoints.
Navigate to your API end-point and see that the break-points work.
NOTE: By default it appears the function will be at http://localhost:7071/api/functionName
------------------- EDITED But Below Held for Posterity --------------
Okay, it looks like you can not do this with local debugging, but can with "Remote Debugging" within WebStorm.
Within WebStorm from Run -> Edit Configurations create a new "Node.JS Remote Debug".
Give the debugging some type of name.
Hit the + Sign where it says, "Before Launch: External Tool" and choose "Run External Tool".
Hit the + Sign again and fill it out like the screen-shot (This is assuming you installed the Azure Function CLI globally).
NOTE: The above screenshot has been updated based on the latest version of Azure Functions CLI/. Earlier versions required you to state an app name, and did not require --debug to debug. As a result if you are not updated to the latest version of Azure Functions CLI (now known as Azure-Functions-Core-Tools) you may need to have "run MyApp" in the Parameters field.
Within WebStorm choose Run-> Debug:"What_You_Named_the_Remote_Profile"
Add some breakpoints.
Navigate to your API end-point and see that the break-points work.
NOTE: By default it appears the function will be at http://localhost:7071/api/functionName
Add this to your local.setting.json file under values: "languageWorkers:node:arguments": "--inspect=5858"
Click Edit configuration. Click the plus icon and choose Attachto Node.js/Chrome
Fill in these values for the options: host: localhost - Port: 5858 and set Attac to option to "Crhome or Nod.js>6.3 started with --inpect"
Start the function and run the debugger
See this picture: https://i.stack.imgur.com/hnC74.png
I have moved an existing node.js + express project to VS because I prefer the IDE over JetBrains for now (used VS for years, only peeked into Webstorm).
I used NTVS new project->from existing sources and all files were imported successfully.
Afterwards, I opened the project settings of my project and set the node.exe arguments to bin\www, startup file for express.
When I press F5 (debug) I get the console.log messages I have put into the www and app.js files in the opening command prompt, and it looks like the server is running (cannot confirm, I want to debug if everything is working), but the VS debugger directly exits again, it also does not open any page in the browser I selected for debugging.
My node app actually is a REST webservice, so I want to test different URLs with different parameters.
Also, I cannot access the app on the port I specified, though when I directly start it from node.exe I can, even though the command prompt is still open.
(I have NTVS and WebEssentials installed - some operations take a long long time, but I attribute this to NTVS being still an early version.)
Question: how does the Visual Studio debugger stay connected to the node.js application so I can use breakpoints and use any browser then to connect and test different URLs? (Even a breakpoint put on the console.log that gets printed during startup is not being triggered.)
For everyone who asks receives, and the one who searches finds....
(and yes, I did spend a long time searching and trying before posting here..)
Kind of nice to debug node.js server with VS..
hope this helps someone
Edit: The arguments to node.exe can be hard to read in the image. It must be
--debug=<portno>
that is with two dashes (and not just one) to specify the debug port.
Not so much knowledge on expressjs but with a recent release of NTVS 1.0 Alpha, I did find it supports remote debugging which can be also used to debug nodejs app running locally - anyway haven't tried if it works with nodejs app + expressjs but it should.
I followed the step in this video https://youtu.be/-ir9ZB8lUg4 which is
Run your nodejs with node.exe RemoteDebug.js <your_javascript_file>.
RemoteDebug.js has come when you install NTVS.
In Visual Studio, select Debug > Attach to Process
Select Node.js remote debugging for Transport
Enter localhost:5859 for Qualifier
Click Attach
This will put Visual Studio in debugging mode which you can set a breakpoint, do step-in/step-out, very same experience when you use VS to debug .NET app.
Its pretty straight forward with NTVS, you can download required version for your windows from github here
Once you install NTVS, NodeJS project templates will be added
Now, Goto File->New project -> Basic NodeJS Express 3 application (it will be available in javascript project templates)
Now just goto debug and select Start Debugging, add breakpoints where ever required and you can start debugging