can Chrome debugger find ts files if not served by server - google-chrome

I'm generating .js.map files so that I can debug my TypeScript code in Chrome. js.map files point to the correct location of the typescript in the "sources" property. sourceRoot is "", and sources is the path to the typescript code from the location of the js file on disk (using outDir in jsconfig.json so that they're placed under the WebContent tree), but the typescript is outside of the web content tree. In the debugger in Chrome, it shows that map files were detected, I see a directory tree in the Sources list in the debugger, it points to the right location on disk, and it contains all of my ts files in the right locations (visually), but opening any one of them shows empty contents. Double-clicking in the .js file in the debugger to set a bp takes me to the empty .ts file. I don't know what details to provide in order to have a chance of getting help on this. All questions welcome.

I had the same problem as you. The solution is simple.
In your build.xml you have excluded somehow these *.ts files or their parent's folder, so the server doesn't load these files. You can find the excluded files and folders inside a tag fileset excludes="" in your build.xml.
Or inside the same fileset includes="" tag you don't include these files.
See my fileset:

Related

HTML files have disappeared from VS Code Project Folders

Upon opening my VS Code project and selecting the single HTML file inside it, a prompt appeared stating that the HTML file doesn’t exist: “(Error: Unable to resolve nonexistent file [file path])”. I opened the only other VS Code project I have containing an HTML file and the single HTML file within that project had disappeared as well.
I then opened Finder and, navigating to the two projects, found that there were no longer HTML files inside either project folders; only the CSS and JavaScript files I had created were there. Having not opened or touched the projects for about a week or so, I’m confused as to how these two HTML files in two different projects are both now “nonexistent.”
So far I’ve tried to show hidden files in Finder, look up the file names in Spotlight Search, check my Trash bin, and search for the file in my iCloud Drive. However, I still haven’t been able to find or recover the files.
Try to change the file extension from .html to .blade.php . Close your vs code and try to open your projects again.
from the get started window open the folder or file there the drop down menu didn't work for me

How to change file type of a file in PhpStorm?

I have a TypeScript project I manage with PhpStorm. All the *.ts files are properly recognized as TypeScript files and in my file types setting I have the *.ts file map TypeScript.
All the files? No, one file stubbornly won't be treated as a TypeScript file but is shown as plain text. I have no idea how to mark this one as a TypeScript file.
All the *.ts file have the proper ts icon next to them. This one hasn't.
When I open the rogue .ts file, PhpStorm tells me that there are plugins for that file type, yet if I try to follow that route, all it leads me to is for PhpStorm to try to install the TypoScript plugin for which I have no need at all.
I tried:
renaming file from *.ts to *.txt and back to *.ts;
deleting it within PhpStorm and checking it out via git again;
right clicking the file in the Project pane hoping a setting is there in order to mark it as a TypeScript file, yet no such things seems to exist;
invalidating the cache and restart.
It remains a simple text file without syntax highlighting and other TypeScript code importing this file have the error that the references cannot be found within PhpStorm.
It's a valid TypeScript project though, tsc on command line runs fine.
How can I tell PhpStorm to treat this rogue .ts file as a TypeScript file as well?
Go to Preferences > File Types > Text Files and see if the name of the file is listed there. If it is, delete it from that list.

Include JSON file to build/output directory without import

Maybe the title is a bit strange, but I can't seem to find anything about on google.
Question: I have a folder that only contains .ts files and .json files.. Typescript compiles the .ts files and puts it into a separate directory (not as a bundle, just the directory structure 'as-is').
Src /
Workers /
[ModuleA.ts, ModuleA.json],
[ModuleB.ts, ModuleB.json],
[MobuleC.ts, ModuleC.json]
Most of the time I can just require('*.json') and the JSON file will be also placed in to build directory.
But now I have a situation, where importing the JSON will make no sense, because the JSON file gets updated every few seconds and I read the file with fs.readFile('*.json'), so I also don't want it floating around in the v8 cache (through require)
So how do I 'include' a JSON/None-Typescript file into the build, that is not explicitly being importing by either require or import?
For now I just used gulp to copy every .json file in the src folder over to the the respective dist/** folder.
But still find it strange typescript doesn't have something included for it..
Maybe you should checkout --resolveJsonModule, it's a newer feature of typescript.

How to make doxygen copy a folder without changes into generated HTML docs?

I have a folder with bla.html file and some assets (*.png and *.json) it it.
I want doxygen to copy it into HTML documentation root.
How to make it do such thing in doxygen configuration file (not using external script)?
Upon request:
How about (from the documentation / Doxyfile):
HTML_EXTRA_FILES The HTML_EXTRA_FILES tag can be used to specify one
or more extra images or other source files which should be copied to
the HTML output directory. Note that these files will be copied to the
base HTML output directory. Use the $relpath^ marker in the
HTML_HEADER and/or HTML_FOOTER files to load these files. In the
HTML_STYLESHEET file, use the file name only. Also note that the files
will be copied as-is; there are no commands or markers available. This
tag requires that the tag GENERATE_HTML is set to YES.
The full doxygen documentation can be found at : http://doxygen.nl/manual/index.html and the referred part at: http://doxygen.nl/manual/config.html#cfg_html_extra_files

Inject/Remove HTML via Chrome Extension

I'm making a chrome extension and on a specific web page I have a table that has commented out information.
I'd like to remove the comment syntax so that the information is displayed in the table
What kind of content script would I need to parse the HTML for the specific comment syntax and then remove it?
Also, every time I pack my extension to a .crx file the file size nearly doubles. Is this standard? My 16 kb files are turning into a 40 MB extension- I'm worried that it isn't supposed to work like that.
First off, likely when you package your extension into a .crx file, you're putting the resulting .crx file in the same folder as your source files.
Then the next time that you package the extension, instead of your source folder having just the files you want to package, it has the files you want to package plus the previous .crx file. Every time this happens you effectively (just over) double the file size. To prevent this, make sure the .crx file is getting saved to the parent directory.
As far as the uncommenting HTML goes, I would check out this answer:
Uncomment html code using javascript