Why does debug appear in the package.json file? - package.json

I just npm init in an empty folder that didn't do anything, but Debug is floating as shown in the picture.
Why is this floating?
Does this interfere with the error?
If it interferes, is there any way to get rid of it?
I would really appreciate it if you let me know.

This is not an error and the "debug" text is not actually part of the file.
VSCode inserts the "debug" button as a shortcut for running the scripts in the package.json file. When you click on it, a popup will appear allowing you to select the script you want to run or debug.

Related

Android Studio IDE: how to debug through my code only in Flutter?

In Android Studio, I want to debug only my code, but step in to keep taking into dependency library. I see question , also , but they don't solve the problem. I could not find a way to not debug into message_codecs.dart, message_codecs.dart or method_channel_firebase_auth.dart (firebase_auth_platform_interface-1.1.2). I also looked that I can disable or enable all exception , but that is what I don't want.
I simply don't want to step in to these system( dependencies) library. Please let me know if there is any solution.
Go to VS Code user settings. On mac you get to VS Code settings by clicking CMD + ,
2A. Then you search for debugSdkLibraries and dart.debugExternalLibraries and make sure they are unchecked.
2B. Or you can edit your settings in JSON file by adding this:
"dart.debugSdkLibraries": false,
"dart.debugExternalLibraries": false,
E.g. here is my full settings file: https://gist.github.com/tomasbaran/cd0ba7cadec4466356d1dc0faa14f1e2
Right click on a Breakpoint.
Click on "More"
Uncheck "Dart Exception Breakpoint" checkbox
Added screenshot below for reference.
https://i.stack.imgur.com/GdMnp.png
When you're debugging and the code on the next line will go into something that you didn't write, Step-Over instead of Step-Into.
Step-Over will execute until the call stack is in the same state and the line you were on has finished execution.
In vscode you can configure it with "Dart: Debug External Libraries"

How do I get npm to run in terminal?

I'm tasked with creating a simple calculator application for entry to a programming course. I'm having issues with Terminal :(
I'm not looking for an answer to my overall task, I just want to know why Terminal wont RUN!! What am I doing wrong?
Steps as follows:
Create a directory that you will keep your Calculator application in. Call it
something sensible, like "Calculator".
Open up a command prompt and navigate to your calculator directory
Run npm init to create a new Node.js project. Use the default answer to every
question it asks you (just press "Enter") - don't worry if you don't understand
what all the questions mean!
If it doesn't do anything after the final question "Is this ok?", double-check
there's a file in the folder called package.json . If it's there, everything went
smoothly and you can exit the npm init process by typing in the console
Ctrl + C .
So my problem is... when I run npm, all that happens is my Mac asks if Terminal can access or change files in my system, I click yes, then Terminal doesn't do anything from there, no questions etc I just get:
I can't see package.json, so I take it it hasn't worked properly? How can I fix this to move on?
I'm using zsh on terminal.
Well, first off. What ide do you use? (Personally I like Visual Studio Code).
I'm not sure what the short command is for you to open up the terminal but just google it. Otherwise, you can click "Terminal" on the very top and open a new terminal.
When you do this, you will get a new window at the bottom of your screen. This window has some tabs, make sure you are in the terminal tab.
While there, type "npm init".
This will give you your package.json-file.
If you want to use your terminal for outputs I recommend you get nodejs too.

How do I find the source for bugs in Sublime Text?

I have been dealing with a bug in Sublime Text in js files for a while where anytime I write a comma or semi-colon, Sublime Text creates an autocomplete box with a specific number 62118. So anytime I hit enter it will autofill this useless number and I have to delete it.
More keystrokes = More anger, so I was wondering if
anyone has run into this
or if anyone might have an idea whats causing it
OR if anyone has a good general technique for finding bugs in Sublime Text
It seems to only happen in .js files but I could be wrong so help me out here please I'd love to keep the configuration I have.
There may be information in the Sublime console. To open the console go to View > Show Console (ctrl + `).
Otherwise, uninstall your plugins one by one. While it probably isn't necessary, it would be a good idea to restart Sublime each time you uninstall, to make sure any caches the plugins create are cleared.
Finally, you can simply disable autocomplete by adding the following to your User Settings.
"auto_complete": false

Trying to get customization of Sublime Text 3 Build system to work

Does anyone know how automatic build systems work in 3083 right now? Because I am struggling to get it to do the right thing. (p.s. I am not an expert st3 customizer so I am probably just doing it wrong.)
My TypeScript.sublime-build file lives in ../Packages/User and contains:
{
"cmd": ["/usr/local/bin/tsc"],
"file_regex": "^(.+?) \\((\\d+),(\\d+)\\): (.+)$",
"selector": "source.TypeScript"
}
When I edit a .ts file the syntax highlighting is for TypeScript and that is also what is displayed in the bottom right corner. So from that I deduce that ST3 is correctly identifying the desired syntax for the file (although I am not sure where that happens.)
When I choose the TypeScript build system by hand and click CMD-B it runs the build and displays the output in the console, as I expected.
When I have "automatic" build system and I open a .ts file or change to a .ts file that was already open, ST3 again correctly identifies the syntax (bottom right in the window.) However when I click CMD-B it runs the last build method that I happened to have used.
I thought that the idea with automatic is that it would choose the build system based on the syntax identified via the file extension.
Does anyone understand this problem or correct my assumptions?
Never figured out the problem. But I fully uninstalled ST3 and reinstalled it, with the package control and typescript packages and nothing more, and now it seems to work. Oh well. I guess not all the bugs are out yet.

Sublime 2 text - build during saving a .js file

Please, is there an option, how to disable auto-build, when i am trying to save a .js file?
I was elaborating a node.js + express tutorial, and all the time I've saved the file, the build was starting the node.exe binary, what is something that i dont want, only solution was to tick the Build system for example for JSLint, but it still tries to build when I'm saving a file.
I know there is an tick option in Tools -> Save all on Build, but i cant find the inverse option - disable Build all on save.
I've installed the Node package for Sublime 2, and even when its disabled the build system Nodejs trys to build during the saving proces (ctrl+s)
thanks for all hints!
Here are my custom user packages:
"installed_packages":
[
"Dart",
"JavaScript Console",
"JavaScript Snippets",
"JSLint",
"Mocha Runner",
"Mocha Snippets",
"Nodejs",
"Package Control",
"Require Node.js Modules Helper",
"sublime-jslint"
],
This problem was caused by the nodejs package for sublime text 2 - after removing the package completly (not just disabling) I got an error msg when trying to save the app.js
pressed CTRL+S error: Error trying to parse build system: No data in
C:\Users\username\AppData\Roaming\Sublime Text
2\Packages\Nodejs\Nodejs.sublime-build:1:1
Problem solved, but I still don't know, why sublime was calling nodejs.sublime-build direct after saving the app.js file.
Strange behavior, maybe a bug or a unwanted feature (When a file is saved, the pre-set build system is called direct after the save)
Problem solved by removing the whole package.
If you go to the Tools menu, does the Build option have the shortcut Ctrl-S next to it? If so, your key-mapping probably got messed up at some point. Put the following line in your Key Bindings - User file (in the Preferences menu) and save it by selecting File -> Save (double check that its shortcut is still Ctrl-S as well).
{ "keys": ["ctrl+b"], "command": "build" },
Remove the , at the end if it's the last (or only) line in your user keymap.
You can go to Preferences -> Package Settings and through the menu options for each entry, looking for additional keymap definitions. Also, check Preferences -> Key Bindings (Default) and search for build to see if it got changed there to ctrl+s. If so, feel free to change it back to b.
Have you verified "save" is actually being run on ctrl+s? If not, open up the console ctrl+backtick and enter sublime.log_commands(True) Then press ctrl+s If save is being run, you should see command: save. If not, one of the plugins is grabbing the ctrl+s keybinding before it falls back to default.
If save is running, on of the plugins probably has an on_post_save or on_pre_save listener that is kicking off the build. I checked what I thought would be most likely (Mocha Runner) and it does have an on_post_save listener. I don't know if that's what you are seeing, but it would certainly explain it. Try disabling the plugins and rerunning the save to see if that is the case. If it is, you may want to create an issue on whatever plugin, asking them to make the "build on save" optional.

Resources