How to debug contracts? - smartcontracts

When writing a contract, the output of aeproject compile is completely unhelpful:
===== Compiling contracts =====
Contract 'foo.aes has not been compiled'
reason:
undefined
Is there a way to get a more specific reason than undefined?

The compiler should have a response with a comprehensive message of what went wrong already.
Please update your version of aeproject to #2.1.0 and come back to us with feedback if this works for you.
Best regards

Related

How to find specific implicit conversion in VS2013? [duplicate]

When building an application in Visual Studio. It shows the following error when exceeding the error count
fatal error C1003: error count exceeds 100; stopping compilation
Is there a way to increase the error limit?
This limitation is hardcoded. Here is the post from the MSFT employee in the microsoft.public.vsnet.general group dated 2006 (look for 'Fatal Error C1003'):
Hi,
Unfortunately this 100 limitation is
hard coded and cannot be changed. It's
just inpractical to keep all errors
information around since one error may
cause other several errors.
I hope you understand the rational
behind this design by our product
team. However, if you still have
concerns about this, please feel free
to submit your feedback at
http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220
which is monitored by our product
team. Thank you for your
understanding.
Sincerely, Walter Wang
(waw...#online.microsoft.com, remove
'online.') Microsoft Online Community
Support"
I don't think so. VS basically reports all errors it encounters during compilations. There might be some erroneous parts of the code that make the compiler getting caught in an infinite "error" loop.
The limit was implemented to avoid that. In most cases the 100 errors you get are just the same error reported over and over again. What would be the sense in increasing the number of repetitions?
Maybe you can post the code snippet where the error occurs first, so we can help you fix it.
I believe that it is a hard-coded limit, so no.
As others have commented, it's difficult to understand what you want to achieve by this.
At the end of the day, you'll have to fix them all, so get stuck in and start fixing them. Eventually, you'll get below 100, and you can start counting them.
It is not normally valuable to report the actual number of errors when this occurs. Most of the time, when you get C1003, it's actually only a few real errors, leading to a massive chain of other errors.
(e.g.)
If there is an error in a .h file, that error will be reported in every .cpp file that #includes it.
If there is an error that prevents any kind of identifier being defined (e.g. a class, variable, method name), then every time you try to use it later on, an error will be reported.
Workaround to reduce number of reported errors:
rename cl.exe to cl-orig.exe
roll your own cl.exe that launches cl-orig.exe, capturing its stdout / stderr
parse stderr, looking for error messages and counting them
breaks after first n errors
See http://msdn.microsoft.com/en-us/library/ms682499(v=vs.85).aspx for some hints.
I also have a project like this: sometimes Visual Studio decides there is a lot to do, emits 100 really irrelevant messages about other parts of the solution and aborts the build because it reached the message limit without working on the project I'm interested on.
The workaround we have found is to use msbuild to build the solution from a command prompt: the Use MSBuild walkthrough outlines the steps. msbuild outputs all messages to the console and once the build completes we can work and debug again in Visual Studio. Not ideal, but it lets us complete the task at hand.

How can understanding logs help a tester?

I am an automation + manual tester. I would like to understand the reason how understanding the logs of an application(which i am working on) help me in improving my testing skills.
By viewing logs you will get some ideas about the error, if it is data level fix you can release and fix directly without dev team help.
In Java some times Runtime exception will occur, it will not convey messages to you in the interface about the exact problem. By viewing log you can get some ideas about the Runtime exception.
You see, I am really new into android, but the reason logs are important is because they can help you track down issues, such as Java.NullPointerExceptions and can help you trace back to where the issues were. I think there is also a way to create an error dialogue in the log, which can tell you that an error occurred. This is particularly essential in debugging, where you need to solve a problem in your app. I hope this helps, and best of luck. I think you can search up how to write stuff into a log at certain areas. I think the way on how to Log is to access Log class. http://developer.android.com/reference/android/util/Log.html

Error building BigQueryJavaGettingStarted java sample

trying to compile BigQueryJavaGettingStarted.java
from this location:
https://code.google.com/p/google-bigquery-tools/source/browse/samples/java/gettingstarted/BigQueryJavaGettingStarted/src/main/java/BigQueryJavaGettingStarted.java
Cant't seem fix the error:
Line:125, return Bigquery.builder(..... - method is undefined.
Using v2-rev88-1.15.0
Is the code old, or the Jars out of date? Any help appreciated.
Thanks
Closing question since I got this working. My main interest was in debugging Google's RESTFul API. I didn't realize that you could do this with Python BQ tool. There is a swi

Profile guided optimization

I am getting link time error __PogoRuntimeVector when I use /GL and /LTCG:PGI to instrument a DLL. Since nm/dumpbin cannot be used, I could not figure out what causes this error. Can someone throw pointer to it?
-Kartlee
We finally found the solution. Linking with pgort.lib or pgobootrun.lib solve the issue.
See this article for reference - http://blogs.msdn.com/b/vcblog/archive/2008/11/12/pogo.aspx
-Karthik

How to build CGAL with tracing enabled (esp CGAL_NEF_TRACEN)

I am trying to debug an assertion failure exception I get with the CGAL library. CGAL has well placed debug and trace statements all over the library, which I can use to understand what's happening in my case. However despite many efforts I could not find the right compile time flags that will enables those debug and trace messages. I am especially interested in the trace messages printed with the CGAL_NEF_TRACEN macro. I have tried to compile with the cmake option -DCMAKE_BUILD_TYPE=Debug, but to no avail. I don't have much experience with cmake. Please let me know if you know how to do this.
Got the answer on cgal-discuss mailing list. Compile a debug version and set the global variable debugthread to 0.