how to disable debug mode for sql - postgresql

I had set a DEBUG var in .env file,
DEBUG=sequelize:sql*
and I am not able to disable it, even after commenting it out and rebuilding the app locally. I would like the sql queries to stop being displayed. My tech stack is Node.js

Related

How to stop VS Code from opening browser

I'm running a local server on localhost through VS Code using nodemon on my mac. So everytime I save, the server restarts and updates. My problem is that VS Code always switches window to my browser when the server restarts, so my flow gets interrupted. There must be a way to prohibit VS Code from opening my browser, or at least not doing it at every restart of server?
Look into script your nodemon runs when it's watcher detects change and locate call that starts the browser there: presumably you have one in your "start server" script.
It would probably involve your local server address and call like require('child_process').exec(); see How to use nodejs to open default browser and navigate to a specific URL.
I kind of solved it by adding "BROWSER=none" so my start script (which otherwise only said "nodemon server.js"). But then the browser won't refresh automatically and I'm still curious what's causing it.

How to reload server with changes via VS Code's liveshare shared terminal

Helping a colleague out remotely with some coding using VS Code's LiveShare extension. I'd like to work on a file, save it, and have the server reload with the changes I have made. Typically this would just hot-reload when I save the file, but it isn't because I am remotely editing via live-share session. Also, even with a shared terminal I don't know of a way to restart the server as ctrl-c will exit out of the shared terminal. Any help would be greatly appreciated!
This is probably dependent on what type of code you are working on.
If it is js/css/html, you can launch the server with no cache and turn on the debugger, when you use the "Restart" function of the debugger, it will save the file and push the new version to the server.
I use the https://www.npmjs.com/package/http-server. It can be launched with no cache using the -c-1 option.

On NetBeans, my Node.js server does not automatically restart after changes

I've been using Atom, Sublime Text and Code, and all of those would make the server restart after any changes. With Netbens it doesn't happen.
I have two different servers in my project, one for the client and other for API. Simply executing the commands in either my OS's terminal or Netbeans's terminal also doesn't make the server to restart. Tried to look for suggestions but those I found also didn't happen. The solution was to modify the start file in Properties > Run and check the only checkbox it's in there, but nothing.
What's necessary to do in Netbeans to refresh the server automatically after saving any file? And also, how to run two at the same time? Client and API.

How do I debug server-side meteor code with Webstorm 7

I'm having some trouble getting server-side debugging of my Meteor project working with Webstorm 7.
I've read this jetbrains support article for Webstorm 6. Webstorm 7 has simplified the node.js remote debug options and there is no longer an option to enter a local directory and remote path.
I've tried:
Running meteor with the node debugger options:
$ NODE_OPTIONS="--debug=47977" meteor
Setting up a node.js remote debug configuration in Webstorm, pointing it at the same port (47977).
Launching the debug session
Setting breakpoints in my coffeescript source files - no dice, never hits breakpoints.
Setting breakpoints in the meteor generated js files in .meteor/local/build/programs/server/app - no dice either.
Has anyone got this working? Obviously it would be ideal to be able to debug directly in my coffeescript, but I'd settle for the js at this point!
I don't know if using coffeescript would change this but This Post is what I did to get it working.
In the end, the closest I got was to:
Run meteor with the node debugger options:
$ NODE_OPTIONS="--debug=47977" meteor
Setup a node.js remote debug configuration in Webstorm, pointing it at the same port (47977).
Launch a debug session
Set my breakpoints in the transpiled js files shown in the debugger's "scripts" tab. Confusingly, when setting breakpoints on these files, my version of WebStorm (8.0.4) did not show the usual red circle icon in the gutter... but it did set the breakpoint and break there.
So not ideal, but still better than nothing while we wait for official Meteor support from JetBrains (and more convenient than using node-inspector).

How to have change debugger setting in Eclipse for a launch file

His,
I have been trying to find out why starting DevMode with Debugger from Eclipse was so slow and noticed in the list of processes on my machine the following line:
/usr/lib/jvm/jdk1.6.0_14/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:47248 ...
Apparently the application is suspended to wait until the debugger is connected which takes about 2 minutes. I would like to set "suspend=n". Does anyone know where I could set this directive. The vm section in Eclipse launch configuration is empty and if I paste the updated debugger config there is a error telling that the values are entered twice.
As I understand it, Eclipse takes this config from somewhere and inserts it automatically when I run launch configurations in debugger mode.
Thanks
You can't remove that parameter and, if you could, it wouldn't make a difference. When you connect a new browser to the GWT OOPHM instance it has to compile the entire project for use in development mode. This is what takes time, not waiting for the debugger to attach.