sources assets files in js-debug missing with visual studio code on Apache Royale - visual-studio-code

I use visual studio code and setup it following theses instructions :
https://github.com/apache/royale-asjs/wiki/Visual-Studio-Code
Everythings worked fine.
For now I deleted bin folder in main project, and when launch debug, then bin and js-debug and others stuffs are right generated, but my assets dir with used jpg are not copied.
For exemple in the code I use <j:Image src="assets/logo.png" percentHeight="100"/> but the is no assets/logo.png in js-debug. So I must copy it manualy...
Here is my asconfig.json :
{
"compilerOptions": {
"targets": [
"JSRoyale"
],
"theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css",
//"html-template": "src/main/resources/jewel-example-index-template.html",
"source-map": true,
"source-path": [
"src"
],
},
"files":
[
"src/main/royale/App.mxml"
]
}
and tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"type": "actionscript",
"clean": true,
"problemMatcher": []
},
{
"label": "build",
"type": "actionscript",
"debug": true,
"problemMatcher": []
}
]
}
Could someone tell me how to copy assets folder automatically ?
thanks
Regards

Add to your asconfig.json file:
"copySourcePathAssets": true

Related

How to cope with this error while compiling latex with vscode?

I followed several tutorials on the Internet and tried to build a latex environment in vscode. However, after I've installed everything and started running a .tex file, it came up with the following error:
Qt: Untested Windows version 6.2 detected!
xelatex: Bad parameter value.
xelatex: Data: font_mem_size
source code test.tex: (I put it in a folder on desktop)
\documentclass{article}
\begin{document}
Hello World!
\end{document}
I tried Google, but didn't find any effective approach. I also restarted my computer and reinstalled MiKTeX, but nothing changed.
By the way: I installed LaTeX workshop, MiKTeX and Strawberry Perl (just following the tutorial) and added this into the settings.json of vscode.
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
],
},
{
"name": "pdflatex",
"tools": [
"pdflatex"
]
},
{
"name": "xe->bib->xe->xe",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "pdf->bib->pdf->pdf",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.autoBuild.run": "onFileChange",
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
Update: the issue was solved by reinstalling MiKTeX and resetting its environment variables in PATH.
The issue was eventually solved by reinstalling MiKTeX and resetting its environment variables in PATH. (Another way is to directly install MiKTeX in its recommended directory, which is how I solved the problem.) In addition, the code I added in the settings.json should be discarded (or vscode will report errors).

VS code extension dependencies not being deployed when debugging?

Running Visual Studio Code 1.52.1.
I created a simple VS Code extension as described in this tutorial. Then I added a dependency as shown below. The problem is that this dependency does not seem to get deployed when debugging.
package.json
"dependencies": {
"#types/markdown-table": "^2.0.0"
}
And the actual import looks like this:
import * as table from 'markdown-table'
Then I hit F5 just as described in the linked tutorial. When my registered command is run, I get the following error message:
Activating extension 'undefined_publisher.hello-world' failed: Cannot
find module 'markdown-table'
For completeness, here is the generated tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "src",
"strict": true
},
"exclude": [
"node_modules",
".vscode-test"
]
}
Should be able to add a preLaunchTask.
For Example in .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"preLaunchTask": "npm: build"
}
]
}

TFS Task plugin upload exception and create warning on console

Getting exception and warning while uploading and package extension of Build Task.
I make a build task plugin i use below manifest file
{
"id": "sample-custom-build-task",
"type": "ms.vss-distributed-task.task",
"description": "Adds sample type Build Task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "buildtask"
}
}
Buildtask is a folder in home directory that contains node_modules,task.json,tsconfig,package.json and task image file.
tsConfig.json is look like this.
{
"compilerOptions":
{
"target": "es6",
"module": "commonjs",
"lib": ["es2015"],
"allowJs": true,
"checkJs": true,
"sourceMap": true,
"removeComments": true,
"strict": true,
"noImplicitAny": false,
"moduleResolution": "node",
"typeRoots": ["node_modules/typings"],
"types": ["node"]
},
"exclude": [
"**/node_modules/*",
"/NodeExecutor.ts"
],
"enableAutoDiscovery":true
}
Whenever i package my plugin there is some warning on console.
Refer image
and upload an extension show this error
Strange, for me, in past i make build task plugin but no error and warning whenever i add node_modules in my package it gave me error.
What i going to wrong, i add whole build task folder in my manifest file.
Thanks in advance.
Remove "addressable": true code for BuildTask:
"files": [
{
"path": "logo.png",
"addressable": true
},
{
"path": "BuildTask"
}
]
Also, the BuildTask folder should contains task.json file.

C++ in Visual Studio Code: Include path not found

I use Visual Studio code with the extensions "C/C++ for Visual Studio Code" (ms-vscode.cpptools) for developing simple C++ programs. I have added the configuration file cpp_properties.json to the .vscode subfolder to get intellisense support (see below). Unfortunately VS code does not honor the include path defined herein. I always get green swiggles under #include directives saying #include errors detected. Please update your includePath. ....
What's strange is, that the before mentioned error disappears when I select the correct configuration using the command C/Cpp: Select a configuration .... I have to repeat this command everytime I reopen the project. So obviously the include paths seems to be correct.
Is it possible to make VS Code or the CPP extension store the active configuration? Or is it at least possible to define a default configuration?
c_cpp_properties.json:
{
"configurations": [{
"name": "MinGW on Windows",
"includePath": [
"${workspaceRoot}",
"${MINGW_HOME}\\include\\c++\\7.1.0",
"${MINGW_HOME}\\include\\c++\\7.1.0\\x86_64-w64-mingw32",
"${MINGW_HOME}\\include\\c++\\7.1.0\\backward",
"${MINGW_HOME}\\lib\\gcc\\x86_64-w64-mingw32\\7.1.0\\include",
"${MINGW_HOME}\\include",
"${MINGW_HOME}\\x86_64-w64-mingw32\\include"
],
"defines": [],
"browse": {
"path": [
"${workspaceRoot}",
"${MINGW_HOME}\\include\\c++\\7.1.0",
"${MINGW_HOME}\\include\\c++\\7.1.0\\x86_64-w64-mingw32",
"${MINGW_HOME}\\include\\c++\\7.1.0\\backward",
"${MINGW_HOME}\\lib\\gcc\\x86_64-w64-mingw32\\7.1.0\\include",
"${MINGW_HOME}\\include",
"${MINGW_HOME}\\x86_64-w64-mingw32\\include"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"intelliSenseMode": "clang-x64"
},
{
"name": "GCC on Linux",
"includePath": [
"${workspaceRoot}",
"/usr/include/c++/6",
"/usr/include/x86_64-linux-gnu/c++/6",
"/usr/include/c++/6/backward",
"/usr/lib/gcc/x86_64-linux-gnu/6/include",
"/usr/local/include",
"/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"/usr/include"
],
"defines": [],
"browse": {
"path": [
"/usr/include/c++/6",
"/usr/include/x86_64-linux-gnu/c++/6",
"/usr/include/c++/6/backward",
"/usr/lib/gcc/x86_64-linux-gnu/6/include",
"/usr/local/include",
"/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed",
"/usr/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"intelliSenseMode": "clang-x64"
}
],
"version": 2
}

Chain pre-launch tasks in VS Code

Is it possible to invoke more than one pre-launch task using VS Code?
I try to restore packages then build then run but I can only get to configure build.
My launch.json:
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/src/myProject/bin/Debug/netcoreapp1.0/myProject.dll",
"args": [],
"cwd": "${workspaceRoot}/src/myProject",
"stopAtEntry": false,
"externalConsole": false
},
My tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"args": [
"./**/project.json"
],
"isBuildCommand": true,
"showOutput": "always",
"problemMatcher": "$msCompile"
}
]
}
so I tried to specify the dotnet restore command however it does not work.
I know this is long over due. However, I think I figured out the solution. Steps I did.
Create a workspace to include all the projects in the workspace.
Go to Run and Debug, and click on "Add Config (workspace)
the format is the following:
{
"folders": [
{
"path": "project1"
},
{
"path": "project2"
},
],
"launch": {
"version": "0.2.0",
"compounds": [{
"name": "Chain Stars",
"configurations": [
"ConfigurationName1",
"ConfigurationName2",
]
}]
}
}
ConfigurationName1, and ConfigurationName2 is the profile name you would like to put them in sequence to launch your website.
4. Save the profile. In this case. "Chain Stars" is going to show up in the profile name for you to run it. Let me know if you have any questions.