Desktop version

Main > Forum > 1C:Enterprise Platform > Studying 1C:Enterprise platform > Debug &AtServer and function DoMessageBox

Forum

Search UsersRules
Debug &AtServer and function DoMessageBox
#1
Active user
Points:: 0
Joined:: Jan 14, 2013

Hello all.
I have code : It run versions 8.3.6.2041

Code
&AtClient
Procedure BeforeClose(Cancel, StandardProcessing)
   ChangeItem = BeforeCloseAtServer(); //debug
   If ChangeItem = True then
      DoMessageBox(NStr("en = 'item change';vi = 'Gia tri da thay doi'"));
   EndIf;
EndProcedure

&AtServer
Function  BeforeCloseAtServer()
   ChangeItem = False;
   If Write() and ThisObject.Items.Dvcs <> Metadata.Constants.Dvcs  then
      ChangeItem = True;         
   EndIf;
   Return ChangeItem;
EndFunction

When i  put debug &AtClient and &AtServer but it run atclient not run debug to atserver ?
And run function DoMessageBox at 1C Enterprise it error

Profile
#2
Guest
Points::
Joined::

Hello, P& A.

Would you please translate what is written on this error message into English?

Try replacing DoMessageBox() function with asynchronous ShowMessageBox().

If you have created a new infobase in 8.3.6, you have prohibited of using modal dialogs. This option is set in the configuration tree root.

Profile
#3
Active user
Points:: 0
Joined:: Jan 14, 2013

Hi Timofey.
Message : Prohibit use the Status window mode at this !
I used in thin client --> it's ok, 1C Enterprise it error
how can i do it ?

And i can't debug functon &AtServer when i put debug.

Profile
#4
Just came
Points:: 0
Joined:: Jan 22, 2015

You can set modality usage mode in properties of configuration tree root: Properties -> Compatibility -> Modality usage mode

You also need to start 1C:Enterprise 8.3 Server Agent with -debug param to allow debug at server:
Control Panel -> Administrative tools -> Services -> 1C:Enterprise 8.3 Server Agent properties and change command line for it. For example
Before:
""C:\Program Files (x86)\1cv8\8.3.4.317\bin\ragent.exe" -srvc -agent -regport 1541 -port 1540 -range 1560:1591 -d "C:\Program Files (x86)\1cv8\srvinfo""
After:
""C:\Program Files (x86)\1cv8\8.3.4.317\bin\ragent.exe" -srvc -agent -regport 1541 -port 1540 -range 1560:1591 -d "C:\Program Files (x86)\1cv8\srvinfo" -debug"

Or you can do this with regedit
Find [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\1C:Enterprise 8.3 Server Agent\]
Find property "ImagePath"= , and add "-debug".
You need stop 1C:Enterprise 8.3 Server Agent before this changes and start after it

Profile
#5
Active user
Points:: 0
Joined:: Jan 14, 2013

Hi all.
Thanks, i can do it.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.