Тема: пошаговая отладка в AutoCAD 2013

Доброго утра!
Кто-нибудь сталкивался с проблемой пошаговой отладки в AutoCAD2013?
Использую студию 2010.
Пробовал так: http://through-the-interface.typepad.co … -2010.html
но чтото первый метод не помог (самое интересное, что после этого мне пришлось переустанавливать AutoCAD)
второй не сработал, третий... не стал пробовать потому что переустанавливал AutoCAD :cry:
есть еще варианты?
спасибо

Re: пошаговая отладка в AutoCAD 2013

ssdiesel пишет:

самое интересное, что после этого мне пришлось переустанавливать AutoCAD

Крайне странно. Думаю, что достаточно было перезагрузится.

ssdiesel пишет:

Кто-нибудь сталкивался с проблемой пошаговой отладки в AutoCAD2013?

В чем она у тебя проявляется?

Re: пошаговая отладка в AutoCAD 2013

опишу мои действия:
1. Ставлю breakpoint в VS, запускаю ACAD.
2. ACAD: Ввожу команду NETLOAD, выбираю сборку.
3. VS: Debug->Attach to Process...
4. Выбираю процесс acad
5. Ввожу команду... AutoCAD зависает..

Попробовал поиграться с Attach to:
Managed v2. Native code
5. Но breakpoint выводится с восклицательным знаком: The breakpoint will not currently be hit. No symbols have been loaded for this document.

Кстати, Александр, действительно перезагрузка помогла.

Re: пошаговая отладка в AutoCAD 2013

А попробуй немного по другому:
- Ставлю breakpoint в VS[S], запускаю ACAD.[/S]
- В свойствах проекта в разделе "Отладка" в пункте "Запуск внешней программы" указываю файл acad.exe из папки с автокадом
- Жму кнопочку Отладка->Начать отладку
- ACAD: Ввожу команду NETLOAD, выбираю сборку.
[S]- VS: Debug->Attach to Process... [/S]
[S]- Выбираю процесс acad [/S]
- Ввожу команду...

Re: пошаговая отладка в AutoCAD 2013

неа чтото не очень помогло..вылетает ошибка при загрузке AutoCAD

System.Windows.Markup.XamlParseException was unhandled
  Message=Provide value on 'System.Windows.Markup.StaticExtension' threw an exception.
  Source=PresentationFramework
  LineNumber=0
  LinePosition=0
  StackTrace:
       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.LoadDeferredContent(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings parentSettings, Uri baseUri)
       at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
       at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.InitQATMenus()
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.RestoreItems()
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.Initialize()
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.LoadQuickAccessToolbar()
       at LoadQAT()
  InnerException: System.Reflection.TargetInvocationException
       Message=Exception has been thrown by the target of an invocation.
       Source=mscorlib
       StackTrace:
            at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
            at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
            at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
            at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
            at System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(Type type, String name, Object& value)
            at System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider)
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
       InnerException: System.InvalidProgramException
            Message=Common Language Runtime detected an invalid program.
            Source=Acmgd
            StackTrace:
                 at Autodesk.AutoCAD.ApplicationServices.Application.get_UIBindings()
            InnerException:

Re: пошаговая отладка в AutoCAD 2013

При загрузке автокада? А модуль, полагаю, не стоит в автозагрузке?
А пункт №2 отсюда сделали?
А сервис паки стоят на акаде? А какой framework?

Re: пошаговая отладка в AutoCAD 2013

да при открытии акада
модуль стоит в автозагрузке
2 пункт сделал, но появляется ошибка

---------------------------
Exception in acmgd.dll ARX Command
---------------------------
Unhandled Exception 0 (Access Violation Reading 0x0000) at address 14232C3Bh
---------------------------
ОК   
---------------------------

SP отсутсвуют
framework v4.0.30319

Re: пошаговая отладка в AutoCAD 2013

почемуто когда делаю второй пункт автокад вообще перестает запускаться(

Re: пошаговая отладка в AutoCAD 2013

Во-первых - сделай так:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
  </startup>
  <!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->
  <runtime>
    <generatePublisherEvidence enabled="true" />
    <loadFromRemoteSources enabled="true" />
  </runtime>
</configuration>

Во-вторых - убедись, что у тебя стоит полная версия фреймворка (там бывают какие-то неполные версии)
В-третьих - убери модуль из автозагрузки и попробуй без него акад открыть
В четвертых - в модуле ставь брейкпоинт прям в первой строчке Initialize()

Re: пошаговая отладка в AutoCAD 2013

Сделал все что написано, ошибка поменялась:

System.TypeInitializationException was unhandled
  Message=The type initializer for 'System.Windows.PresentationSource' threw an exception.
  Source=AdWindows
  TypeName=System.Windows.PresentationSource
  StackTrace:
       at Autodesk.Private.Windows.ToolBars.ToolBarHwndSource..ctor(HwndSourceParameters srcParams)
       at AdApplicationFrameHostImp.{ctor}(AdApplicationFrameHostImp* , HWND__* hParent)
       at AdApplicationFrameHost.CreateInstance(HWND__* hParent)
  InnerException: System.TypeInitializationException
       Message=The type initializer for 'MS.Internal.TraceDependencyProperty' threw an exception.
       Source=WindowsBase
       TypeName=MS.Internal.TraceDependencyProperty
       StackTrace:
            at MS.Internal.TraceDependencyProperty.get_IsEnabled()
            at System.Windows.DependencyProperty.RegisterCommon(String name, Type propertyType, Type ownerType, PropertyMetadata defaultMetadata, ValidateValueCallback validateValueCallback)
            at System.Windows.PresentationSource..cctor()
       InnerException: System.Configuration.ConfigurationErrorsException
            Message=Configuration system failed to initialize
            Source=System.Configuration
            BareMessage=Configuration system failed to initialize
            Line=0
            StackTrace:
                 at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
                 at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
                 at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
                 at System.Configuration.ConfigurationManager.GetSection(String sectionName)
                 at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
                 at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
                 at System.Diagnostics.DiagnosticsConfiguration.Initialize()
                 at System.Diagnostics.DiagnosticsConfiguration.get_Sources()
                 at System.Diagnostics.TraceSource.Initialize()
                 at System.Diagnostics.TraceSource.get_Switch()
                 at System.Diagnostics.PresentationTraceSources.CreateTraceSource(String sourceName)
                 at System.Diagnostics.PresentationTraceSources.get_DependencyPropertySource()
                 at MS.Internal.TraceDependencyProperty.<.cctor>b__0()
                 at MS.Internal.AvTrace.Initialize()
                 at MS.Internal.AvTrace..ctor(GetTraceSourceDelegate getTraceSourceDelegate, ClearTraceSourceDelegate clearTraceSourceDelegate)
                 at MS.Internal.TraceDependencyProperty..cctor()
            InnerException: System.Configuration.ConfigurationErrorsException
                 Message=An XML comment cannot contain '--', and '-' cannot be the last character. Line 7, position 3. (C:\Program Files\Autodesk\AutoCAD 2013\acad.exe.Config line 7)
                 Source=System.Configuration
                 BareMessage=An XML comment cannot contain '--', and '-' cannot be the last character. Line 7, position 3.
                 Filename=C:\Program Files\Autodesk\AutoCAD 2013\acad.exe.Config
                 Line=7
                 StackTrace:
                      at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
                      at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
                      at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
                      at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
                 InnerException: System.Xml.XmlException
                      Message=An XML comment cannot contain '--', and '-' cannot be the last character. Line 7, position 3.
                      Source=System.Xml
                      LineNumber=7
                      LinePosition=3
                      SourceUri=""
                      StackTrace:
                           at System.Xml.XmlTextReaderImpl.Throw(Exception e)
                           at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
                           at System.Xml.XmlTextReaderImpl.ParseCDataOrComment(XmlNodeType type, Int32& outStartPos, Int32& outEndPos)
                           at System.Xml.XmlTextReaderImpl.ParseCDataOrComment(XmlNodeType type)
                           at System.Xml.XmlTextReaderImpl.ParseComment()
                           at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
                           at System.Xml.XmlTextReaderImpl.Read()
                           at System.Xml.XmlTextReader.Read()
                           at System.Configuration.XmlUtil..ctor(Stream stream, String name, Boolean readToFirstElement, ConfigurationSchemaErrors schemaErrors)
                           at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
                      InnerException:

Все-таки есть подозрение,что акад с фреймворком не очень хочет работать

Re: пошаговая отладка в AutoCAD 2013

Для 2013 акада 4 фреймворк "родной" :)
Я вот так и не пойму - эта ошибка просто при открытии акада, или при запуске модуля?
З.Ы. Может стоит все-же сервиспак поставить? ;)

Re: пошаговая отладка в AutoCAD 2013

ошибка просто при открытии акада даже.
но сейчас поставлю SP

Re: пошаговая отладка в AutoCAD 2013

На всякий случай и это обнови http://www.microsoft.com/ru-ru/download … x?id=17851

Re: пошаговая отладка в AutoCAD 2013

с фреймом все ок.
поставил SP1.1
такая же фигня((
не хочет акад запускать и все.
я вот думаю, мож библиотечки какой не хватает

Re: пошаговая отладка в AutoCAD 2013

Кусок твоей ошибки:

at MS.Internal.AvTrace..ctor(GetTraceSourceDelegate getTraceSourceDelegate, ClearTraceSourceDelegate clearTraceSourceDelegate)
at MS.Internal.TraceDependencyProperty..cctor()
InnerException: System.Configuration.ConfigurationErrorsException
Message=An XML comment cannot contain '--', and '-' cannot be the last character. Line 7, position 3. (C:\Program Files\Autodesk\AutoCAD 2013\acad.exe.Config line 7)
Source=System.Configuration
BareMessage=An XML comment cannot contain '--', and '-' cannot be the last character. Line 7, position 3.
Filename=C:\Program Files\Autodesk\AutoCAD 2013\acad.exe.Config
Line=7

StackTrace:
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()

Может все-же косяк в файле acad.exe.Config? Покажи его

Re: пошаговая отладка в AutoCAD 2013

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0.30319" />
  </startup>
  <!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->
  <runtime>
    <generatePublisherEvidence enabled="true" />
    <loadFromRemoteSources enabled="true" />
  </runtime>
</configuration>

Re: пошаговая отладка в AutoCAD 2013

А я тебе не так писал :)

Re: пошаговая отладка в AutoCAD 2013

я знаю)) но v4.0 от v4.0.30319 ничем не отличается

Re: пошаговая отладка в AutoCAD 2013

ssdiesel пишет:

я знаю)) но v4.0 от v4.0.30319 ничем не отличается

Лучше писать v4.0

Re: пошаговая отладка в AutoCAD 2013

к сожалению результат одинаков(

Re: пошаговая отладка в AutoCAD 2013

А еще - лучше открой файл acad.exe.Config не блокнотом, а через VS

Re: пошаговая отладка в AutoCAD 2013

ну на самом деле, мне кается разницы нет, чем открывать, это же всего лишь файл конфигурации.
но все равно..фаталит.
надо еще на форумах порыть..

Re: пошаговая отладка в AutoCAD 2013

У тебя в ошибке четко написано, что проблема в этом файле! Дословно - "Комментарии XML не могут содержать символы "--", и символ "-" не может быть последним в строке. Линия 7, позиция 3".
Когда ты открываешь файл с помощью VS (можешь еще браузером любым открыть), то он открывается именно как xml-файл. И в случае ошибки в тексте - тебе об этом сообщится!

Re: пошаговая отладка в AutoCAD 2013

аа сорри, я забыл написать, что комменты удалил.
чтото я запамятовал.
там уже другая появляется

System.Windows.Markup.XamlParseException was unhandled
  Message=Provide value on 'System.Windows.Markup.StaticExtension' threw an exception.
  Source=PresentationFramework

  LineNumber=0
  LinePosition=0
  StackTrace:
       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.LoadDeferredContent(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings parentSettings, Uri baseUri)
       at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
       at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
       at System.Windows.ResourceDictionary.get_Item(Object key)
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.InitQATMenus()
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.RestoreItems()
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.Initialize()
       at Autodesk.AutoCAD.Internal.Windows.QuickAccessToolbarService.LoadQuickAccessToolbar()
       at LoadQAT()
  InnerException: System.Reflection.TargetInvocationException
      Message=Exception has been thrown by the target of an invocation.
       Source=mscorlib

       StackTrace:
            at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
            at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
            at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
            at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
            at System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(Type type, String name, Object& value)
            at System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider)
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
       InnerException: System.InvalidProgramException
            Message=Common Language Runtime detected an invalid program.
            Source=Acmgd

            StackTrace:
                 at Autodesk.AutoCAD.ApplicationServices.Application.get_UIBindings()
            InnerException:

Re: пошаговая отладка в AutoCAD 2013

Ого! Я бы на твоем месте сначал снес автокад под чистую, а затем поставил бы заново :)