I am trying to compile my c++ code with bazel. i want to dig deeply into what happened behind the surface. is there any debugger tool(like a gdb debugger) that can be used to debug the google bazel skylark code, i want to track the bazel skylark script execution step by step and how?
Thanks!
Unfortunately there's no Skylark debugger yet.
Though it's not a debugger, you can use print to print debug messages.
Use VSCode with the Bazel plugin.
In the future, I hope other IDEs/tools will support the protocol too.
#László is correct though there has been some work done on this which you might be able to utilize.
See this thread from bazel-dev: [Design doc] Debugging Protocol for Skylark and Bazel Integration
Related
I want to generate code from dart files especially from dart packages at runtime.
I have been using build_runner as a dev_dependency to parse and generate code, which is really awesome! But the problem that I don't know how to use it as a normal dependency so I can use in my application.
Also I found that build_runner uses analyzer as a core, but didn't find good documentation about them.
So, how can I use build_runner as a normal dependency to parse and generate code at runtime?
Thanks in advance.
You can perform actions that the build_runner run CLI command does with the run function exposed programatically.
For lower-level access to build logic that may be more suited to programatic usage, the APIs provided by package:build may be more useful. Alternatively, the actual code generation packages may expose their own APIs for code generation.
In this article it says: "The Dart VM reads and executes source code, which means there is no compile step between edit and run.". Does that mean that you can exchange source-code on the fly in a running Dart system like in Erlang? Maybe the compiler is removed from the runtime system and then this is no longer possible. So that's why I'm asking.
Dart is run "natively" only in Dartium, which is a flavour of Chrome with DartVM. When you develop an application you still need to compile it it to JavaScript. This way you get fast development lifecycle and in the end you can compile code to JS. Because it's compiled code there is lots more room for compiler to run optimisations on the code. So from my perspective, the compiler is still there and I don't think you would be able to replace code at runtime.
You can send around source code and run it, but it would need to be in a separate isolate. Isolates do have some relationship to Erlang concepts.
The Dart VM doesn't support hot swapping (Called live edit in V8). However, based on mailing list discussions, it sounds like this is something that the authors do want to support in the future.
However, as the others have mentioned, it is possible to dynamically load code into another isolate.
It seems an obvious improvement, in Kate, to jump directly to the error location given in a gcc error message. It would great if it can be made to work directly in Kate's terminal, but I would settle for a tool that can yank text off the x clipboard. Failing that, is there a way to write an add-on for Kate to do this?
Thanks.
Mike.
from the terminal we can run something like this:
$ kate source.cpp --line=45
you could write a script to parse gcc output and re-open kate to that line in the source. If kate already has the source code open, it will simply emulate a jump to the line.
There is "Build" plugin for Kate, which does also stderr parsing, and understand GCC error syntax.
So for example you can easily configure in Kate to build your project with make (and KDevelop is sharing this part of Kate source and plugin, although KDevelop has extra plugins for project management), and you will see in the Build plugin output parsed errors, clicking on them will direct you to the particular source file and line.
(but I was just looking around if it can even mark the error lines in the source visually, and actually there's nothing like it? From my limited understanding of the Kate plugin API I would be slightly afraid this is not trivial to add to current Build plugin, but I didn't dig into the Kate sources enough to fully understand its architecture and what are the true limits for plugin code).
The Delphi Linker strips out any functions that aren't actually used, thus reducing the executable size.
Is there any way to stop the Delphi Linker doing this? e.g. a compiler switch?
To those wondering "why?"...
I am trying to use the delphi-code-coverage tool, but it only reports on code that is actually compiled into the executable. Which makes it not very useful. If I could get Delphi to include all code, I'm hoping I could then get some useful code coverage statistics.
I should mention that I have DUnit tests in a separate project to my application. So even though the code is "unused" in the DUnit project, it is used in the actual application.
See here for more details.
Your code-coverage tool is measuring the wrong thing. It works off the map file instead of the source code, so it will only report on live code instead of on all code in a project. The linker already filters out the dead code, and in a blank unit-test project, all code is dead code. There is no way to tell Delphi to include dead code in an EXE.
Run the code-coverage tool on your application to get a list of functions that needs testing. Then, write code in your unit-test project that mentions all those functions. (It doesn't have to call everything yet, and it certainly doesn't have to test it all. We're just making sure it's linked to the unit-test project.) Now the coverage tool can get an accurate measurement of what's been executed and what hasn't.
I would like to know if is there any easy way to test actionscript by using some kind of application like ruby's irb or javasctip spidermonkey where you can just open up your terminal and type the code straight away.
This would be a good time saver when speaking of actionscript, since to test some syntaxes, classes, etc. you would need to compile it via fsch.
But still not a good option just for quick testing, etc...
Duplicate Answer By Duplicate User
Please Flag User:
Gama11
I have used FlashDevelop in some of my projects where automated builds were necessary: FlashDevelop has always utilized .Net and haXe an open source complier for AS 2.0 and later AS 3.0 ...
Flash Develop will utilize haXe in a command line fashion: within the project settings you are able to modify this command set or deploy manually once the windows based platform has been installed.
Sometimes I use NotePad++ to write down and save parts of my code so I can see it clearly. It does contain Actionscript in the "Languages", and it is plain and easy to use. But I am not sure how much it checks for mistakes.
I believe that writing and compiling in flash is the easiest way. If you have a syntax error it will tell you.