I have been using a .NET class library in my Asp.NET mvc5 project. I have set a debug point in the class library but the debugger is not hitting. I have tried these methods:
Load the symbols from module
The module is showing that the symbol is loaded, but the debugger is not hitting and no variable from the debug point is showing on autos.
When I click "Step Over", the debug pointer stands on the line where the library function was called.
Related
I'm creating a NodeJS based application with sapui5 framework but I'm facing a problem.
My app and view work well in my Windows 10 environment. Now I'm trying to continue developing it in Ubuntu but I'm facing this problem in Checkbox.js:
The resource from http://localhost:8000/resources/sap/m/Checkbox.js was blocked due to MIME type ("type/html") mismatch (X-Content-Type-Options: nosniff).
Uncaught (in promise) Error: failed to load 'sap/m/Checkbox.js' from resources/sap/m/Checkbox.js: script load error
As you can see, the control does exist:
All other controls work normally. So when I remove the checkbox, my view works without problems.
See the section Console shows Uncaught Error: failed to load 'sap/m/xxxxx.js' from the doc.
And the reply by Tobias (tobiasso85) on the same issue:
Serving the resources depends on the server and its underlying filesystem used.
While Unix based systems are case-sensitive,
Windows is not case-sensitive by default.
I.e. in your view, you must have somewhere <Checkbox> which works on Windows but not on Ubuntu.
→ Change it to <CheckBox>.
Same applies to <ComboBox>, <LightBox>, <FlexBox>, ... etc.
Bonus: there are Breadcrumbs from the sap.m lib and BreadCrumbs from the sap.uxap lib. 👍
PS: when working in an IDE or editor that supports VSCode extensions, consider installing the official UI5 Language Assistant. That extension would've notified you that something is wrong:
The "Combobox" name is neither a class name in the "sap.m" namespace nor an aggregation of the <parentControl> class.
I'm looking for some guidance on my strategy for unit testing UWP components.
I am developing a UWP component using the C++/WinRT projection. This component contains a helper class that manages communication with a Bluetooth device. I would like to write unit tests for that helper class (BthDevice) without exporting them to the UWP component's interface.
I started by following some guidelines for testing non-exported DLL classes. Specifically, I created a new UWP unit test project. I explicitly added my project's include directory, included BthDevice.h, and added the class' BthDevice.obj to the linker settings. I fought a few linker errors, and now it's falling over because I'm using precompiled headers in the UWP component. I've given up for now.
It feels like this should be a simple task, and that I'm going about it the wrong way. Any guidance is welcome! Thanks.
https://github.com/AppsFlyerSDK/XamariniOSBinding
Is anyone able to get this repo running?
I am hitting an null reference exception on startup because the tracker object is null - although this is bound as a static in the API Definition
// +(AppsFlyerTracker *)sharedTracker;
[Static, Export ("sharedTracker")]
AppsFlyerTracker SharedTracker ();
I was having the exact same issue and I found out what the problem is. I was testing this using the simulator.
The AppsFlyer SDK returns null for the AppsFlyerTracker.SharedTracker() method if the app is running on the simulator. Make sure that you run the app on a real device, and that you check for a null before calling methods on SharedTracker() otherwise you'll get a NullPointerException from Xamarin.
Make sure you've added a reference to AppsFlyerXamarinBinding.dll in your project's references, under .Net Assembly.
The dll file can be found in the project's Bin/Debug folder (you'll have to build the binding project first in order to generate an updated dll file).
Also, add "using AppsFlyerXamarinBinding" in your delegate.
This is not exactly a question as I found the solution for the problem. Just hope it will help others who can encounter it.
We use Robolectric to write unit tests for a project which uses a library (actually several libraries). The libraries as well as application uses a lot of resources.
Lets suppose that Eclipse workspace contain project Library (with "library.package" as top package) which creates an Android library and project Application (with "app.package" at the top) which uses Library. the project Test is Robolectric project which refers to the Application project.
All of a sudden we found that very simple test which checks for existence of a particular view in the activity fails. For example:
#Test
public void testProgressBarInit() {
LoginActivity activity = Robolectric.buildActivity(LoginActivity.class).create().get();
assertTrue(activity.findViewById(R.id.status_text) instanceof TextView);
}
The library project implements the LoginActivity and defines an appropriate resources (layout). Failing tests run perfectly before we changed our code structure a little bit eliminating one more library.
Running the test under debugger showed that findViewById call uses correct value of the R.id.status_text taken from Application/gen/R.java file. At the same time, we discovered that the value of R.id.status text in the Application/gen/R.java differs from the value in Library/gen/R.java. Also, the Appication/gen directory contains file library.package.R.java which contains the same value for status_text as in the Application/gen/R.java (which differs from original one in the Library/gen/R.java). It is normal behavior of aapt tool which can change resource ids while merging resources from the library and the application.
After some investigations we found the following:
Robolectric loads resource IDs which was defined in the library twice: once using R.class from application project and another using R.class from the Library project
which class is loaded depends on the class path configuration
to run tests we need to export the Library project from the Application project
if Library project is exported before Application/gen folder in the class path configuration, Robolectric replaces resource ids by those found in the Library/bin/classes/library/package/R.class
if Library project is exported after Application/gen folder, Robolectric uses correct resources found in the Application/bin/library/package/R.class.
It is certainly a bug in the Robolectric implementation as it should not load resource ids from R.class associated with library package. All ids are propagated to the Application/gen/R.java (see discussion here on GitHub).
If you encounter this or similar problem with resource usage while using Robolectric, make sure that you export library project after Application/gen folder in the Build Path-Order and Export configuration.
What is the difference between native only, managed only, script only and mixed (managed and native) debugger types? They can be found in a project's properties page.
Different runtime environments have different debuggers. You are giving the choice of debugger you want to use to avoid starting one up that you'll never use and thus cutting the overhead. The debugger types are:
Managed: suitable for .NET code written in a managed language like C# or VB.NET
Native: suitable for code generated by the C or C++ compiler
Mixed: a choice you'll make when you need to debug .NET code that inter-operates with native code, common in C++/CLI projects or when you need to debug a pinvoke problem
Script: useful to debug scripting code, like Javascript, that runs in a browser
GPU: used to debug C++ AMP code that runs in a graphics card
Silverlight: used to debug Silverlight code that runs in a browser
T-SQL: used to debug stored procedures that run on SQL Server
Workflow: used to debug WF workflows