How do I skip external files when debugging a Flutter app in VS Code? [duplicate] - flutter

This question already has answers here:
How do I skip external code when debugging in VS Code
(9 answers)
Closed 2 years ago.
I set a breakpoint because I want to investigate what's going on.
I step over/into
Suddenly it goes off to a different (external) file. It's a swirl of going back and forth to different files forever and after 15 minutes I'm still not in my file and don't know what bug I have.
How can I force the debugger to stay only in my file/or potentially only in my folder?
Question no.2. What's the diff btw step over and step into?

In VSCode, if you want to skip over files that you don't want to debug, usually files in your node_modules etc you can add a setting to tell VSCode to skip the files when debugging, so you can make the configuration only debug your code.
You have to add a setting skipFiles to you launch configuration, i.e. launch.json
Example:
"skipFiles": [
"<node_internals>/**",
"**/app/out/vs/**"
]
You can read more about excluding the files you don't want to debug here - Skipping uninteresting code (node, chrome)

Related

Flutter debug only open/specific files (Android Studio)

New to Flutter/Dart, and currently learning to debug with Android Studio (latest version Artic Fox) . When debugging I see options for: Step Over, Step Into, Step Out, Run to Cursor, etc.
When I debug, the debbugger opens new tabs with nested dart functions or classes (such as framework.dart, silver.dart, object.dart, etc). Those are not files I created, which I am not always interested on seeing them (at least for now).
I tried googling this topic, but I didn't find anything relevant. StackOverflow has a similar question (2 years old), but there was no solution.
Is there an option to debug only opened or specific .dart files? At times, I am only interested in debugging open files. Plus, it takes time close all the debugger opened tabs.

In Visual Studio Code, can I start a debugging session with custom arguments without editing settings.json?

I'm building a program that acts on files that it has to download from one of my company's servers. We have several million of these. For instance, my normal invocation could be:
python my_script.py file-id
And then my_script.py will go download file-id and do its work on it.
It's useful to be able to specify one fixed file to download and act on while I make changes to our code, but when it comes to testing at scale, I'll usually find out that maybe a dozen files couldn't be processed correctly, and I need to go and debug our program with it.
For this purpose, editing the settings.json file works, but it's kind of cumbersome that I have to change the parameter, save, run, and revert every time I just want to test a new input.
Is there a way that I pass an argument to a debug configuration as I start debugging, instead of having to change the settings.json file?

NetBeams checking for external changes - suspended bug out whole IDE [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
Like 3 days ago, my netbeams started to sometimes bug out. It is either when i am just starting netbeans, and "Background scanning of objects" get stuck at any percent (it varies), o ir if loads properly, after some time, "checking for external changes - suspended" will show up and then the problems starts: netbeans does not compile errors, does not open class or start a code (it will show as "lengthy operation in progress", after some time, output will show that no compiler was found, if clicked on class - "go to source or something like that"). After restarting netbeans, if it loads properly, it will run smoothly until same thing happens. Also, i saw that even when i close netbeans, there is a java process running in a task manager(uses like 30% of my cpu).
I tried reinstalling, deleting everything by hand and then reinstalling, cleaning cache... Nothing helps. Also it happened at the same day on my 2 computers.
I think it has something to do with "checking for external changes -suspended", because when a bug starts, this process will always appear. Even if i close it manualy (just click X), it will start again after few secs. I tried to disable automatic scanning of procceses in options it doesnt help, and acts the same (just checking for external changes suspended doesnt appear anymore).
It is not consistent, but makes me unable to properly work. Maybe anyone has any ideas what should i do?
Yes, you should delete NetBeans cache! The path of the cache directory is listed in the About window (menu Help/About). Close NetBeans, then delete the directory. NetBeans will rebuild its cache when it starts up.
I was also able to reduce the likelihood of this occurring by disabling "auto-scanning of sources".
Once disabled, you can trigger this manually by right clicking the project folder and choosing "Refresh Folder".

How to prevent NetBeans from remembering open files?

When I start NetBeans, I don't want it to automatically open the files that were open when I last closed it.
The only way I found to do that is to delete the following files:
del /q "%APPDATA%\Netbeans\7.2.1\config\Windows2Local\Components\MultiView-java*"
Is there a better way, e.g. an option that prevents NetBeans from saving the state of the open files on exit?
I know the question is very old but the issue is still there :) and the solution is the following:
Set/Open the desired starting files, project and then go to menu Window > Reset Windows.
It will remember whatever you had. So if you close all documents and call window reset, you will have no default opened files, which might be great for some of us.

missing source files

This is NOT a life or death issue. I do have a backup from 2 or 3 days ago. - I think the answer to this may be "Learn to always save & backup your files every night, before you turn out the lights and go home" but just in case there is a happier answer, here goes.
I was programing some Android/Java stuff in Eclipse. I left the machine on with eclipse open and a couple of source java/xml files open inside of eclipse and gave up for the night. When I sat down at the machine this morning, I had a message that windows had preformed an update, and had re-booted my machine. after re-logging in and opening Eclipse it showed the source files in edit windows and they looked normal, but as soon as I tried to type in the edit window, I got some kind of a message that "Files are derived, do I really want to edit them" (I could be wrong on the exact wording. I didn't copy the text down before hitting no or Cancel or whatever the choice was that I thought would get me out of there without doing anything). after I left that screen, it showed me a now blank edit window for the source files. I closed that and and tried to re-open the file from the Package Explorer, but it wouldn't open. So I closed Eclipse and took a look in the /src directory and it appears the source files are gone. I do have a backup from a couple of days ago, so it's not a life or death problem to go back, but my real questions are.
1- Is this a normal occurrence when a machine boots/power fails/crashes unexpectedly with source files open in Eclipse?
2 - Did I answer the "Files are derived..." question wrong? is there something I could have done at that point to rescue the file?
Any comments welcome. - Joe
If you remember where your files were, you could right click on the parent in the Project Explorer > Restore from History or Replace With > Local History.
This feels like a very basic local VCS.
Even though this is not an endless history, you can extend the size allowed for Eclipse to keep such previous versions.