Angular dart on WebStorm. Debug is no more working - dart

It is a week now that I have problems debugging angular dart applications in WebStorm. If I use debug on a console (server) application everything works fine.
I tried to roll back to angular 4.0.0 (on dart 1.24.3), but this didn't help.
I really don't know what kind of info could be useful.
Please, let me know if there is some configuration file that I can print or that could be important in order to fix the problem. I tested a lot of configurations, but, at present, I'm not able to work properly. After filling up my code with print statements, there are some cases where also this practice is not enough.
Edit1:
I have tried to create a sample project. With no DDc and target chrome, the debugger stops but not on all breakpoints. With no DDc and target Dartium, it does not stop.
Edit 2:
I was running my application with target dartium, because with target chrome I had an annoying error that I was not able to catch. Now I got it, and running the project with target chrome, revives the debugger. This is a good new. Just a question, is a problem of release 1.24.3 (Dartium has not been released for this release) or something else? Anyway, if this is a known problem, it wouldn't be better to disable the target dartium on WebStorm when the release is 1.24.3?
Edit 3:
Now the debugger is working, but only on the project you are developing. The imported packages are not stopping on breakpoints. As my project is divided in a lot of packages, I cannot debug approximately 80% of my code.
Am I doing something wrong?

What you are hitting here isn't functionality directly in an Angular Dart or Dart issue, but in the JS Debugger in WebStorm.
Open an issue on YouTrack here: https://youtrack.jetbrains.com/issues
Include not only the version of Angular and the Dart SDK, but also the version of WebStorm, and an example of where breakpoints are not working.
Finally, there is some information in this issue that might help: https://youtrack.jetbrains.com/issue/WEB-30593

Related

Logging and breakpoints not working in XCTests

I have a large iOS project, and my problem is that, when running XCTests:
Breakpoints within the app, or within the tests themselves, are not hit
NSLogs/prints from within the app are not visible within the test log, but logs from within the tests are visible
I have another iOS project within the same workspace, and breakpoints and logging work fine.
The iOS project in question was originally created on an old version of Xcode (circa 2012, unsure which version exactly); and I have seen this comment elsewhere from somebody having seen this issue with an old .xcodeproj.
The project itself is hybrid Obj-C/Swift, uses several Cocoapods, a watchkit extension, and tests divided into three targets.
Given my project's complicated configuration, I would prefer to avoid beginning again with a fresh .xcodeproj and try to mirror exactly the configuration of my faulty one.
What could the reason for this fault be and what might I change within my existing .xcodeproj's configuration to fix it?
Select your scheme, go to Edit scheme... and tick the Debug executable option under the Test > Info pane.
The debugger will attach to both your tests and your target application, and breakpoints will be hit on both parts of your project.
Note that when a breakpoint is hit in your target application, your test is still running and may time out, killing both applications.
The culprit was DEPLOYMENT_POSTPROCESSING = YES in the project file.
This has to do with how your test scheme is set up. I was having the same issue and I fixed mine by turning Debbuging "ON" for the test executable.
I made a new scheme for my UI tests, so I assumed the debugger wasn't attaching to the new UI tests scheme when no breakpoints were hit. However, this post
had the correct answer for me.
In my case breakpoint was not hit in just one callback, so I changed "Swift Compiler" "Optimization Level" to "No optimization" in project target build settings for debug, and it started working in Xcode 9.3 as well as AppCode.
For breakpoint not working case check which Optimization Level you have, if you have the new -Os breakpoints start acting weird, change to -None or No Optimization in debug mode whatever option you have
Problem with logs not appearing in a debug area, in my case, was due to the OS_ACTIVITY_MODE argument which was set to "disable" in Scheme -> Test -> Arguments
I tried everything in the replies as of this date, but in the end the only thing that worked in my case was to remove the target and recreate it again.

Couldn't get Xamarin projects working with Rider-EAP on OSX

I was really excited, when JetBrains launched the Project Rider-EAP. First thing I've tried was to get a Xamarin-iOS project to run in Rider-EAP, but it doesn't work out of the box.
Update 1: This issue is now listed as critical bug with fix in EAP 2: https://youtrack.jetbrains.com/issue/RIDER-618
1. Problem (fixed) Projects didn't load with the exception that Xamarin.iOS.targets could not be found.
I fixed this with a simple Symlink:
ln -s /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/ “/Applications/Rider EAP.app/Contents/lib/ReSharperHost/macos-x64/mono/lib/mono/xbuild/”
2. Problem
References are not loaded correctly. Therefore the whole syntax highlighting and everything beyond is broken.
See screenshot: References are not loaded correctly
I get the following error as well:
Error:null: Error initializing task MakeDir: Could not load file or assembly '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Tasks.dll' or one of its dependencies
Switching the xbuild to mono 4.2.2 removes the error but not solves the problem.
PS: It seams that the references are loaded correctly for Xamarin Android projects.
Basic Xamarin Support like open and build is added with EAP 8 of Project Rider.
More advanced features will come with the next Builds and are tracked here: https://youtrack.jetbrains.com/issue/RIDER-1533

I can't get NSLogger successfully intergrated to my app

I can't get NSLogger working in my iOS project, or even in a new empty project.
I was in need of some logging frameworks, and I chose NSLogger after some comparison because its desktop viewer is exactly what I need.
I use CocoaPod in my project, so the installation is quite simple. Just add one line in the Podfile and running 'pod update' in the console will do.
I followed the instructions in NSLogger wiki to configure:
First, add LoggerStartForBuildUser() into the main() function;
Second, replace NSLog() with LogMessageCompact() in my code.
And then I build my project and run it on my iPhone 6 plus(with 8.2 system).
My app works fine but I have no log in the console, not a word!
I setup a few break points and make sure the right logging code did execute.
But still nothing happened as if NSLogger never exists.
I created a brand new empty app project and done the same installation procedure, but still no log was shown.
I really wanna know if I missed anything. Anyone who had come across similar problem like mine?
PS:My development environment is Yosemite + Xcode 6.2
Problem solved.
It turns out that the NSLogger cannot connect to the desktop viewer. I had to use LoggerSetViewerHost(NULL,hostname,port) instead of LoggerStartForBuildUser().And It works like a charm.
But every time I restart the desktop viewer, the port will change. So I had to change the port in my code and re-compile. That's a little annoying.
And by default, NSLogger would redirect all the NSLog() to its log buffer. So it's normal to see nothing in the console, unless you use LoggerSetOptions(kLoggerOption_LogToConsole) to force NSLogger to copy all the logs into the console.

Dart Polymer white screen of death?

I have a project that works fine when I view as Javascript but when I boot it in Dartium nothing is shown. There is no errors either. I am not sure what I have done. Even other projects that haven't had their code touched for weeks no longer can be view in Dartium so I assume it's a dodgy package but pubspec only uses browser, polymer, tweenengine.
Thoughts?
I also had that problem yesterday. Deleting Dart Editor + Dartium and installing it again, fixed it for me. A Friend also had that problem, reinstalling also fixed it for him.

dart, polymer build failure, can'tfind polymer/polymer.dart?

I have a project that was building fine a few days ago, since then I haven't changed my dart-sdk or any library dependencies or update dart editor to my knowledge, I just made a very small change to one of my polymer elements to use paper-buttons instead of standard buttons, the change can be seen here
Now when I run pub build I get the following errors, and I have no idea why, if I look in packages polymer/polymer.dart does exist and dart editor doesn't show any warnings in the project. similarly if I undo my latest changes and go back to my last working version I still get this exact same error, so I'm not sure how to debug this, any hints would be much appreciated.
Can't read 'package:polymer/polymer.dart' (Could not find asset polymer|lib/polymer.dart.).
import 'package:polymer/polymer.dart';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For such weird problems it's often a good idea to try pub cache repair.
I found an open issue with the same error message: http://dartbug.com/20285
Check if pub get or pub upgrade show some warnings, errors, ...

Resources