- ago
My strategy has this line in it:
BarHistory VIXBars = GetHistory(bars, "VIX.XO");
Whenever I attach WL7 to VS debugger I get this error:
IQFeed Error getting (VIX.XO): debugger Detected.

Is there a rule against using a debugger to debug my code or just a bug?



1
2,101
26 Replies

Reply

Bookmark

Sort
- ago
#1
This indeed looks like a rule against attaching debugger while the extension is loaded. Thanks for pointing this out. We'll see what can be done to fix it for Build 2.
0
- ago
#2
Just curious, build 2 - is it sometheng of a distant future or what's your plan for releasing updates.
0
- ago
#3
Thanks Eugene. It will be nice to find a fix as soon.
I refactored and converted more than 5000 lines of code from WL6 to WB7. Most of the changes were mechanical but there are few places I have to debug to see what's going on.
examples:
- BuyAtMarket used to return a position. while WL7 PlaceTrade returns a transaction.
- No SetContext in WL7.

0
Glitch8
 ( 10.62% )
- ago
#4
Build 2 is planned for Monday.
1
- ago
#5
Fixed, please update to Build 2.
0
- ago
#6
verified. Great job!
0
- ago
#7
Another "Debugger Detecter" Exception. With another extension, I guess.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeInitializationException: The type initializer for 'WealthLab.DataExtensions.FOMClIndicator' threw an exception.
---> System.Exception: Debugger Detected
at †††
†††Š•ˆ.†††
†††Š•‡.†††
†††Š•˜()
at WealthLab.DataExtensions.FOMClIndicator.†††
†††Œ‹()
at WealthLab.DataExtensions.FOMClIndicator..cctor()
--- End of inner exception stack trace ---
at WealthLab.DataExtensions.FOMClIndicator..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at MockBase.VisitCustomer(Type , MockBase )
at WealthLab.Core.TypeLoader.CreateInstance(Type t)
at PoolMapper.SortRule(Object , Type , PoolMapper )
at WealthLab.Indicators.IndicatorFactory.SetVisitor()
at WealthLab.Indicators.IndicatorFactory.Initialize(IIndicatorChartConduit conduit)
at MethodMapping.ForgotObject(IIndicatorChartConduit , MethodMapping )
at WealthLab7.MainController..ctor()
at WealthLab7.MainController.CreateInstance()
at WealthLab7.App.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
0
- ago
#8
I got it when I tryed F5 beeing in Visual Studio. Like described here: https://www.wealth-lab.com/Discussion/New-instruction-for-using-Visual-Studio-to-develop-and-debug-strategies-5494

By the way, how can I uninstall the certain extension? For example I want to make VS2019-WL7 link work before "Debugger Detected" fixes?
0
- ago
#9
This is protection against attaching disassembly software in actions. As you figured out, uninstalling DataExtensions will make the message disappear. To uninstall this extension, simply delete its DLL file named WealthLab.DataExtensions.dll with WL7 closed. Sorry for the inconvenience.
0
- ago
#10
Thanks

Russian extension is'n ready for VS as well)

System.Windows.Markup.XamlParseException: Вызов конструктора для типа "WealthLab7.MainWindow", удовлетворяющего указанным ограничениям привязки, привел к выдаче исключения.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Exception: Debugger Detected
at †††
†††‡“.†††
†††‡’.†††
†††ˆŠ()
at WealthLab.Russia.RussiaExtension..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at MockBase.VisitCustomer(Type , MockBase )
at WealthLab.Core.TypeLoader.CreateInstance(Type t)
at WriterImporter.ReadInvalidRules(Object , Type , WriterImporter )
at WealthLab.WPF.ExtensionsFactory.Initialize(IWLClientHost host)
at PageAdvisor.ForgotObject(Object , IWLClientHost , PageAdvisor )
at WealthLab7.MainWindow..ctor()
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
at System.Windows.Application.DoStartup()
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
0
- ago
#11
Yes, currently you will get such exception on any extension but IQFeed. Suggestion above on uninstalling extensions should do the trick.
0
- ago
#12
Thank you Replikant_m!

I downloaded Visual Studio Community Edition. I created a C# Library targeting .NET Core 3.1. Added all the WealthLab*dll in the reference.

When I click Debug run, it starts WealthLab 7, and then it shows this message in a pop-up:
CODE:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'WealthLab.DataExtensions.FOMClIndicator' threw an exception. ---> System.Exception: Debugger Detected at ††† †††Š”.††† †††Š”œ.††† †††Š•”() at WealthLab.DataExtensions.FOMClIndicator.††† †††Œ‹() at WealthLab.DataExtensions.FOMClIndicator..cctor() --- End of inner exception stack trace --- at WealthLab.DataExtensions.FOMClIndicator..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor) at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at System.Activator.CreateInstance(Type type) at MockBase.VisitCustomer(Type , MockBase ) at WealthLab.Core.TypeLoader.CreateInstance(Type t) at PoolMapper.SortRule(Object , Type , PoolMapper ) at WealthLab.Indicators.IndicatorFactory.SetVisitor() at WealthLab.Indicators.IndicatorFactory.Initialize(IIndicatorChartConduit conduit) at MethodMapping.ForgotObject(IIndicatorChartConduit , MethodMapping ) at WealthLab7.MainController..ctor() at WealthLab7.MainController.CreateInstance() at WealthLab7.App.OnStartup(StartupEventArgs e) at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


Any idea?
0
- ago
#13
Yes, you have a "debugger detected" error. See the bottom of

https://www.wealth-lab.com/Discussion/Error-attaching-VS-debugger-to-WL7-Debugger-Detected-5516
0
- ago
#14
I am not able to move beyond "Initializing Indicators...". This is the screenshot:
0
- ago
#15
Adding another data point.
Deleting WealthLab.DataExtensions.dll worked for me as well.

----

Thank you superticker!!!
That link helped me in resolving the issue.
It is working nicely!!!
0
- ago
#16
That's correct. The system detected a code hacker (you), so it shuts everything down. So you need to remove the extension with the protected code. Go to the link in Reply# 23 to read about what to do.
1
- ago
#17
Workaround: move the extension DLLs out of the WL7 folder prior to debugging your solution.

In upcoming extension build(s) we plan to alleviate the trouble and let our users developing custom DLLs load WL7 under debugger with extensions installed.
0
- ago
#18
I have the following "Debugger Detected" error when using VS debug. It looks like WealthLab.Indicators.DLL caused the issue, not an extension. And I can't remove WealthLab.Indicators.DLL from WL7 folder, otherwise my strategy won't work.

Please help...

Jack

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Exception: Debugger Detected
at †††
†††–‹†.†††
†††–Šž.†††
†††–‹–()
at WealthLab.Indicators.AccelerationDeceleration..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at TestsException.ExcludeImporter(Type , TestsException )
at WealthLab.Core.TypeLoader.CreateInstance(Type t)
at BridgeDispatcher.AssetSchema(Object , Type , BridgeDispatcher )
at WealthLab.Indicators.IndicatorFactory.StopProducer()
at WealthLab.Indicators.IndicatorFactory.Initialize(IIndicatorChartConduit conduit)
at ModelExporter.SetupWorker(IIndicatorChartConduit , ModelExporter )
at WealthLab7.MainController..ctor()
at WealthLab7.MainController.CreateInstance()
at WealthLab7.App.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
0
- ago
#19
Something went wrong during build process. We'll fix this for Build 7. Thanks for the heads-up.
0
- ago
#20
I noticed that this issue hasn't been fixed since Build 6.

Any plans to do that soon? Renaming the extension DLL's before debugging Is getting a bit tedious...
Thanks...
0
- ago
#21
I'm pretty sure we've fixed this but there's a chance of something slipping in. What extension DLL is affected?
0
- ago
#22
WealthLabIndicatorProfilerBuild2.exe and WealthLabPowerPackBuild4.exe.

System.Windows.Markup.XamlParseException: Durch den Aufruf des Konstruktors für Typ "WealthLab7.MainWindow", der den angegebenen Bindungseinschränkungen entspricht, wurde eine Ausnahme ausgelöst.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Exception: Debugger Detected
at WealthLab.IndicatorProfiler.IndicatorProfilerExtension..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at IndexerConfig.ResetObserver(Type , IndexerConfig )
at WealthLab.Core.TypeLoader.CreateInstance(Type t)
at FilterRule.CallFailureError(Object , Type , FilterRule )
at WealthLab.WPF.ExtensionsFactory.Initialize(IWLClientHost host)
at ClassProperty.RegisterDatabase(Object , IWLClientHost , ClassProperty )
at WealthLab7.MainWindow..ctor()
--- End of inner exception stack trace ---
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
at System.Windows.Application.DoStartup()
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Exception: Debugger Detected
at WealthLab.IndexLab.CompAdvDec..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at IndexerConfig.ResetObserver(Type , IndexerConfig )
at WealthLab.Core.TypeLoader.CreateInstance(Type t)
at ProductProperty.StopSystem(Object , Type , ProductProperty )
at WealthLab.Indicators.IndicatorFactory.SearchAnnotation()
at WealthLab.Indicators.IndicatorFactory.Initialize(IIndicatorChartConduit conduit)
at SpecificationExpression.RegisterDatabase(IIndicatorChartConduit , SpecificationExpression )
at WealthLab7.MainController..ctor()
at WealthLab7.MainController.CreateInstance()
at WealthLab7.App.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

0
- ago
#23
No, not the PowerPack. These signatures are by Indicator Profiler and Index-Lab. Apparently we haven't re-released them due to absense of changes. We'll have to try to remember and fix this when we upload Build 9!
1
- ago
#24
@Springroll

You can retry. The extensions you mentioned should not bug you with this exception anymore.
0
Glitch8
 ( 10.62% )
- ago
#25
You will need to update said extensions from the web site.
0
- ago
#26
Updating the Extensions WealthLab.IndexLab and WealthLab.IndicatorProfiler has solved the error.
Thanks
1

Reply

Bookmark

Sort