Jump to content
Korean Random
aks1983

Немного про среду для разработки модов

Recommended Posts

03.08.2016 в 20:02, spoter сказал:

Кстати ещё полезно в клиенте включить debug_level = 'DEV' и положить скрипты в /res/scripts/wot

 

А можно чуть подробнее, как включить Verbose-вывод в консоль? Я так понимаю, это даст больше логов)

 

И что за папка scripts/wot?

UPD: разобрался, нужно debug_utils.py перекомпилировать, выставив RELEASE = 1 (имитация dev-окружения)

Edited by Nik7

Share this post


Link to post

Short link
Share on other sites

кто-нибудь настраивал данный отладчик на актуалном клиенте?

Edited by HaterCheaters
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Any updates for a stable development suite? Tips how i can visualise python script connections in the client scripts material. 

 

Sincerly freak 

 

:honoring:

Share this post


Link to post

Short link
Share on other sites
On 8/3/2016 at 10:22 AM, spoter said:

Hello, I’ll tell you a little about the tools that I use:

 

For development I use JetBrains PyCharm IDE

post-6927-0-15688900-1470235996_thumb.png

 

This is a full-fledged IDE, I parse the client sources using pjOrion+ uncompyle6

The main thing is that the file names are in the correct case so that the auto-import of modules works normally.

post-6927-0-54072400-1470236042_thumb.png

 

The tank client has a built-in remote debug, configured by default for Pycharm, but no one forbids connecting to it from another IDE

just drop the contents of the  pycharm-debug.egg archive from the pycharm distribution into the folder  \World_of_Tanks\ res_mods\<version> \scripts\common\pydev\pycharm\ pydev

and enter it into your script

import bwpydevd

bwpydevd.startDebug()

the main thing is to make sure that the scripts are identical

post-6927-0-86666100-1470236093_thumb.png

 

The built-in code inspector alt+shift+i is very helpful in the work , which will tell you how to correctly format the pep8 code, where there are errors (with details) and give other recommendations, and can also reformat the code and optimize imports upon request, again in accordance with the recommendations of pep8, for which I especially love it.

post-6927-0-33054200-1470236062_thumb.png

 

After the code is written, tested and debugged in the client, I literally upload the code to GitHub in a couple of clicks

post-6927-0-43518600-1470236107_thumb.png

 

Choosing an IDE is a matter of taste, for example, a friend of mine codes in Visual Studio and also uses the built-in debug, only with a distribution from his IDE.

And another friend uses Eclipse

 

Good luck everyone )

 

when importing bwpydevd, i always get:
 

i have tried pydev version 2.8.0, which states its for python versions 2 (0.9.22.0.1 is python 2.7 afaik) and i have tried the .egg file that comes with my pycharm professional version. nothing works. however, if i try to do this manually through the debug server mod (github), i just get a "cannot import module _ctypes" :/

 

when changing to bwpydevd.startDebug('pycharm'), simply nothing is printing in the console, and still no connection. yes all my ports and ips are correct.

 

any way to try to solve this? i'm using the most recent version of PyCharm Professional. what version of pydevd should i try using?

 

Edit: Seems to be the issue was inside of bwpydevd.py appending to sys.path only the relative path of the egg contents and not the absolute. I fixed this and now I receive this:
 

2024-02-28 12:09:38.342: ERROR: 0.00s - Debugger warning: The os.path.realpath.__code__.co_filename (scripts/common/Lib/ntpath.py)
2024-02-28 12:09:38.342: ERROR: 0.00s - is not absolute, which may make the debugger miss breakpoints.
2024-02-28 12:09:38.342: ERROR: 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
2024-02-28 12:09:38.352: ERROR: Traceback (most recent call last):
2024-02-28 12:09:38.352: ERROR:   File "bwpydevd.py", line 97, in startPyDevD
2024-02-28 12:09:38.352: ERROR:   File "C:/Users/user/Desktop/wot-offline-server-git/0.9.22.0.1_#788/res_mods/0.9.22.0.1/scripts/common/pydev/pycharm/pydev\pydevd.py", line 46, in <module>
2024-02-28 12:09:38.353: ERROR:     from _pydevd_bundle import pydevd_utils
2024-02-28 12:09:38.353: ERROR:   File "C:/Users/user/Desktop/wot-offline-server-git/0.9.22.0.1_#788/res_mods/0.9.22.0.1/scripts/common/pydev/pycharm/pydev\_pydevd_bundle\pydevd_utils.py", line 9, in <module>
2024-02-28 12:09:38.353: ERROR:     import ctypes
2024-02-28 12:09:38.353: ERROR:   File "C:\Python27\lib\ctypes\__init__.py", line 7, in <module>
2024-02-28 12:09:38.353: ERROR:     from _ctypes import Union, Structure, Array
2024-02-28 12:09:38.353: ERROR: ImportError: No module named _ctypes
2024-02-28 12:09:38.353: ERROR: bwpydevd.py(104) : startPyDevD: Failed to load pydevd: ImportError('No module named _ctypes',)

My version of 2.7 is the most recent, from April 20th, 2020. What could be causing this? How to fix?

Edited by blueferret
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...